{ "_args": [ [ { "raw": "lazy-cache@^1.0.3", "scope": null, "escapedName": "lazy-cache", "name": "lazy-cache", "rawSpec": "^1.0.3", "spec": ">=1.0.3 <2.0.0", "type": "range" }, "/home/jdaugherty/work/GT2/GT2-Android/node_modules/center-align" ] ], "_from": "lazy-cache@>=1.0.3 <2.0.0", "_id": "lazy-cache@1.0.4", "_inCache": true, "_location": "/lazy-cache", "_nodeVersion": "5.5.0", "_npmOperationalInternal": { "host": "packages-12-west.internal.npmjs.com", "tmp": "tmp/lazy-cache-1.0.4.tgz_1461378859142_0.0996799839194864" }, "_npmUser": { "name": "jonschlinkert", "email": "github@sellside.com" }, "_npmVersion": "3.6.0", "_phantomChildren": {}, "_requested": { "raw": "lazy-cache@^1.0.3", "scope": null, "escapedName": "lazy-cache", "name": "lazy-cache", "rawSpec": "^1.0.3", "spec": ">=1.0.3 <2.0.0", "type": "range" }, "_requiredBy": [ "/center-align" ], "_resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", "_shasum": "a1d78fc3a50474cb80845d3b3b6e1da49a446e8e", "_shrinkwrap": null, "_spec": "lazy-cache@^1.0.3", "_where": "/home/jdaugherty/work/GT2/GT2-Android/node_modules/center-align", "author": { "name": "Jon Schlinkert", "url": "https://github.com/jonschlinkert" }, "bugs": { "url": "https://github.com/jonschlinkert/lazy-cache/issues" }, "dependencies": {}, "description": "Cache requires to be lazy-loaded when needed.", "devDependencies": { "ansi-yellow": "^0.1.1", "glob": "^7.0.3", "gulp-format-md": "^0.1.8", "mocha": "^2.4.5" }, "directories": {}, "dist": { "shasum": "a1d78fc3a50474cb80845d3b3b6e1da49a446e8e", "tarball": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz" }, "engines": { "node": ">=0.10.0" }, "files": [ "index.js" ], "gitHead": "d081ffbda147391083a6856fafb1c5d82308f80c", "homepage": "https://github.com/jonschlinkert/lazy-cache", "keywords": [ "cache", "caching", "dependencies", "dependency", "lazy", "require", "requires" ], "license": "MIT", "main": "index.js", "maintainers": [ { "name": "jonschlinkert", "email": "github@sellside.com" }, { "name": "doowb", "email": "brian.woodward@gmail.com" } ], "name": "lazy-cache", "optionalDependencies": {}, "readme": "# lazy-cache [![NPM version](https://img.shields.io/npm/v/lazy-cache.svg?style=flat)](https://www.npmjs.com/package/lazy-cache) [![NPM downloads](https://img.shields.io/npm/dm/lazy-cache.svg?style=flat)](https://npmjs.org/package/lazy-cache) [![Build Status](https://img.shields.io/travis/jonschlinkert/lazy-cache.svg?style=flat)](https://travis-ci.org/jonschlinkert/lazy-cache)\n\n> Cache requires to be lazy-loaded when needed.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install lazy-cache --save\n```\n\nIf you use webpack and are experiencing issues, try using [unlazy-loader](https://github.com/doowb/unlazy-loader), a webpack loader that fixes the bug that prevents webpack from working with native javascript getters.\n\n## Usage\n\n```js\nvar utils = require('lazy-cache')(require);\n```\n\n**Use as a property on `lazy`**\n\nThe module is also added as a property to the `lazy` function\nso it can be called without having to call a function first.\n\n```js\nvar utils = require('lazy-cache')(require);\n\n// `npm install glob`\nutils('glob');\n\n// glob sync\nconsole.log(utils.glob.sync('*.js'));\n\n// glob async\nutils.glob('*.js', function (err, files) {\n console.log(files);\n});\n```\n\n**Use as a function**\n\n```js\nvar utils = require('lazy-cache')(require);\nvar glob = utils('glob');\n\n// `glob` is a now a function that may be called when needed\nglob().sync('foo/*.js');\n```\n\n## Aliases\n\nAn alias may be passed as the second argument if you don't want to use the automatically camel-cased variable name.\n\n**Example**\n\n```js\nvar utils = require('lazy-cache')(require);\n\n// alias `ansi-yellow` as `yellow`\nutils('ansi-yellow', 'yellow');\nconsole.log(utils.yellow('foo'));\n```\n\n## Browserify usage\n\n**Example**\n\n```js\nvar utils = require('lazy-cache')(require);\n// temporarily re-assign `require` to trick browserify\nvar fn = require;\nrequire = utils;\n// list module dependencies (here, `require` is actually `lazy-cache`)\nrequire('glob');\nrequire = fn; // restore the native `require` function\n\n/**\n * Now you can use glob with the `utils.glob` variable\n */\n\n// sync\nconsole.log(utils.glob.sync('*.js'));\n\n// async\nutils.glob('*.js', function (err, files) {\n console.log(files.join('\\n'));\n});\n```\n\n## Kill switch\n\nIn certain rare edge cases it may be necessary to unlazy all lazy-cached dependencies (5 reported cases after ~30 million downloads).\n\nTo force lazy-cache to immediately invoke all dependencies, do:\n\n```js\nprocess.env.UNLAZY = true;\n```\n\n## Related projects\n\nYou might also be interested in these projects:\n\n[lint-deps](https://www.npmjs.com/package/lint-deps): CLI tool that tells you when dependencies are missing from package.json and offers you a… [more](https://www.npmjs.com/package/lint-deps) | [homepage](https://github.com/jonschlinkert/lint-deps)\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/lazy-cache/issues/new).\n\n## Building docs\n\nGenerate readme and API documentation with [verb](https://github.com/verbose/verb):\n\n```sh\n$ npm install verb && npm run docs\n```\n\nOr, if [verb](https://github.com/verbose/verb) is installed globally:\n\n```sh\n$ verb\n```\n\n## Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm install -d && npm test\n```\n\n## Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)\n\n## License\n\nCopyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT license](https://github.com/jonschlinkert/lazy-cache/blob/master/LICENSE).\n\n***\n\n_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on April 22, 2016._", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git+https://github.com/jonschlinkert/lazy-cache.git" }, "scripts": { "test": "mocha" }, "verb": { "related": { "list": [ "lint-deps" ] }, "plugins": [ "gulp-format-md" ], "toc": false, "layout": "default", "tasks": [ "readme" ], "lint": { "reflinks": true }, "reflinks": [ "verb" ] }, "version": "1.0.4" }