reqs v0.5.5
alias for node.js require
Examples
CoffeeScript:
# load reqs package into a local var ($, _, r, o, etc.) $ = require 'reqs' # or register it as a global var (default: '$') require'reqs'register # now you can neatly load packages crystal =$ 'crystal'http =$ 'http'zlib =$ 'zlib' # or just use them inline if $'fs'existsSync 'test.txt' consolelog 'File exists.' # you can also load multiple packages into a local var reqs =$ 'crystal''http''zlib'reqscrystal # crystal package # which can also be used to preload a package before using it inline $ 'crystal''http''zlib'$'crystal' # already loaded # load single/multiple packages as global vars $global 'crystal'$global 'crystal''http''zlib'
JavaScript:
// load reqs package into a local var ($, _, r, o, etc.)var $ = ; // or register it as a global var (default: '$'); // now you can neatly load packagesvar crystal = ;var http = ;var zlib = ; // or just use them inlineif console; // you can also load multiple packages into a local varvar reqs = ;reqscrystal // crystal package // which can also be used to preload a package before using it inline; // already loaded // load single/multiple packages as global vars$;$;