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.
A couple of days ago I posted this snippet for easy access to Node's core modules but it wasn't easy enough because nobody wants to copy paste a snippet every time. That is arguably even more annoying than typing var fs = require('fs') every time.
I ended up publishing this module that wraps it to an elegant functional reactive oneliner. =p Just npm i internal.modules.
/* like this */const{fs,childProcess,http}=require('internal.modules')fs.writeFileSync('directories.txt',childProcess.execSync('dir'))/* or even this */const{mkdir,unlink}=require('internal.modules').fsunlink('directories.txt',error=>error?console.error(error):console.log('file was deleted.'))
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.
A couple of days ago I posted this snippet for easy access to Node's core modules but it wasn't easy enough because nobody wants to copy paste a snippet every time. That is arguably even more annoying than typing var fs = require('fs') every time.
I ended up publishing this module that wraps it to an elegant functional reactive oneliner. =p Just npm i internal.modules.