HNHacker News
TopNewBestAskShowJobs

fixjs

32 karma · joined November 16, 2014

submissionscomments
fixjs··on Asynchronous JavaScript using awaitify
awaitify has a small set of functionality, but it could be really useful, if you want to write clean and readable async code without using any transpilers. Using Awaitify, Function Generators along with `yield` keyword works exactly like async/await function. It also allows to convert old fashioned callback based functions into promise based functions with writing only one line of code. Any feedback would be greatly appreciated.
fixjs··on DefineJS – A lightweight implementation of AMD module format
Check out the DefineJS-v0.2.2 with a bunch of examples and Promised Modules.
fixjs··on DefineJS – A lightweight implementation of AMD module format
A new working example which shows how to use one of the nonstandard syntaxes in DefineJS, something like:

use(['dependency'])

.then(function(dependency){

})

.then()

.cache();

Imagine a control flow in the module definition, or having different private scopes when defining a new module.

fixjs··on DefineJS – A lightweight implementation of AMD module format
I just added a working example of DefineJS which shows the way that the regular AMD format gets implemented.
fixjs··on DefineJS – A lightweight implementation of AMD module format
One of the main goals here is to provide developers the ability of exposing it to different globals with different behaviors and configuration, which is not possible yet in this version, but it will be there in the next couple of hours.
fixjs··on DefineJS – A lightweight implementation of AMD module format
Actually in the current version to expose them to the global scope, you should add the global attribute to your script tag and pass the window as it's value, like global="window".
fixjs··on DefineJS – A lightweight implementation of AMD module format
Thanks for your feedbacks. The next release will be available in the next couple of hours, with a bunch of examples and a more technical RRADME.
fixjs··on DefineJS – A lightweight implementation of AMD module format
@prayerslayer: nothing wrong with require.js, the main goal is to create a more portable alternative and more importantly to add couple of new and nonstandard ways of modular coding as a proposal for the JavaScript community.