JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 115670
  • Score
    100M100P100Q8723F
  • License MIT

Require modules lazily

Package Exports

  • lazy-req

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (lazy-req) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

lazy-req Build Status

Require modules lazily

Install

$ npm install --save lazy-req

Usage

// pass in `require` or a custom require function
var lazyReq = require('lazy-req')(require);
var lodash = require('lodash');

// where you would normally do
_.isNumber(2);

// you now instead call it as a function
_().isNumber(2);

// it's cached on consecutive calls
_().isString('unicorn');

License

MIT © Sindre Sorhus