Pellentesque nec neque ex. Aliquam at quam vitae lacus convallis pulvinar. Mauris vitae ullamcorper lacus. Cras nisi dui, faucibus non dolor quis, volutpat euismod massa. Donec et pulvinar erat.
Where/how exactly do you let sleep not require an async/await function? Your sleep is identical to mine but mine requires you to await it, never found a way around that. Neither mojiscript/threading/sleep or mojiscript/core/pipe exports anything async.
constsleep=require('mojiscript/threading/sleep')constpipe=require('mojiscript/core/pipe')constlog=console.logconstrange=require('mojiscript/list/range')constmap=require('mojiscript/list/map')constsleepAndLog=pipe([sleep(1000),// why this be work??log])pipe([({start,end})=>range(start)(end),map(sleepAndLog)])({start:0,end:10})
Secondly, do you deliberately not comment your exports or is it lazyness? I can help you with that. Most looks pretty straightforward.
And last, maybe you should define a main property in your package.json so that mojiscript can be required the conventional way.
I also want to suggest you stop calling this a language but that is just my opinion and really up to you.
Cofounded Host Collective (DiscountASP.net). Cofounded Player Axis (Social Gaming). Computer Scientist and Technology Evangelist with 20+ years of experience with JavaScript!
And last, maybe you should define a main property in your package.json so that mojiscript can be required the conventional way.
I thought about this, but decided not to. I don't want the entire library being imported into your project. Only the functions you need will be imported to keep the size down.
I also want to suggest you stop calling this a language but that is just my opinion and really up to you.
This has been discussed in the Discord chat. More on the reasons why will be written shortly.
Pellentesque nec neque ex. Aliquam at quam vitae lacus convallis pulvinar. Mauris vitae ullamcorper lacus. Cras nisi dui, faucibus non dolor quis, volutpat euismod massa. Donec et pulvinar erat.
Cofounded Host Collective (DiscountASP.net). Cofounded Player Axis (Social Gaming). Computer Scientist and Technology Evangelist with 20+ years of experience with JavaScript!
Pellentesque nec neque ex. Aliquam at quam vitae lacus convallis pulvinar. Mauris vitae ullamcorper lacus. Cras nisi dui, faucibus non dolor quis, volutpat euismod massa. Donec et pulvinar erat.
I made a script called mojifier that converts your module into a single object with everything included / proper namespaces by iterating the directories/files.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Where/how exactly do you let sleep not require an async/await function? Your sleep is identical to mine but mine requires you to await it, never found a way around that. Neither mojiscript/threading/sleep or mojiscript/core/pipe exports anything async.
Secondly, do you deliberately not comment your exports or is it lazyness? I can help you with that. Most looks pretty straightforward.
And last, maybe you should define a main property in your package.json so that mojiscript can be required the conventional way.
I also want to suggest you stop calling this a language but that is just my opinion and really up to you.
MojiScript's
pipe
,map
,filter
, andreduce
work with both async and sync code. They do not need toawait
anything.You could look at
call
, which will execute with a function after testing if thevalue
is or is not aPromise
. github.com/joelnet/MojiScript/blob...Post your code, I'll figure out the difference.
I'm still looking for a solution for auto-generated documentation. So I am holding off on putting docs directly into the code because the format may differ based on the tool I select. I have posted about the problems I am having here: Let's talk about the state of auto-generated documentation tools for JavaScript
There are full docs for MojiScript here: github.com/joelnet/MojiScript/blob...
I thought about this, but decided not to. I don't want the entire library being imported into your project. Only the functions you need will be imported to keep the size down.
This has been discussed in the Discord chat. More on the reasons why will be written shortly.
Joel, I would like to point out that a main.js does not prevent you from importing only the functions you need. It doesn't matter.
First of all, import statements will still work.
Secondly you can also require selectively only the stuff you need, exactly like import.
The design decision to create every function as it's own import was made to remove a footgun.
The footgun removed is the ability to import the entire library when you only need a few functions.
This way, the output bundle sir is only as big as the functions you import.
So MojiScript will have a microscopic footprint in your final output bundle because it is no longer possible to import the entire bundle.
I made a script called mojifier that converts your module into a single object with everything included / proper namespaces by iterating the directories/files.