Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bulkify

Package Overview
Dependencies
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bulkify

transform inline bulk-require calls into statically resolvable require maps

  • 1.4.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.6K
increased by211.11%
Maintainers
3
Weekly downloads
 
Created
Source

bulkify

transform inline bulk-require calls into statically resolvable require maps

build status

The bulkify function signature is compatible with browserify's transform API.

example

var bulk = require('bulk-require');
var sections = bulk(__dirname, [ 'data/**/*.js', 'render/*.js' ]);
console.log(sections);

You can run this program in node directly:

$ node glob.js
{ data: 
   { cats: { [Function] index: [Circular], meow: [Object] },
     dogs: { [Function] index: [Circular], small: [Object], wolf: [Object] },
     owners: { data: [Object] } },
  render: { x: { oneoneone: 111, twotwotwo: 222 } } }

and use bulkify as a transform, yielding the same output:

$ browserify -t bulkify glob.js | node
{ data: 
   { cats: { [Function] index: [Function], meow: [Object] },
     dogs: { [Function] index: [Function], small: [Object], wolf: [Object] },
     owners: { data: [Object] } },
  render: { x: { oneoneone: 111, twotwotwo: 222 } } }

methods

var bulkify = require('bulkify')

var b = bulkify(file, opts)

Return a transform stream b for file, rewriting require('bulk-require') calls with inline require calls.

You can optionally set extra variables for the static evaluation with opts.vars.

install

With npm, do:

npm install bulkify

license

MIT

Keywords

FAQs

Package last updated on 29 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc