8 ms·
Boxon.cast( fs.readfile, 'myfile' ) .then( function( content ){ console.log( content ) }) .catch( function( err ){ console.log( "Error", err ) }); Boxon is
by jhrobert 13y ago
Boxon.cast( fs.readfile, 'myfile' )
.then( function( content ){ console.log( content ) })
.catch( function( err ){ console.log( "Error", err ) });
Boxon is promise implementation agnostic, works with Q, bluebird, etc... See https://github.com/JeanHuguesRobert/l8/wiki/AboutBoxons https://github.com/JeanHuguesRobert/l8/wiki/AboutBoxons