{ "_id": "import-lazy", "_rev": "3-57ab2b0480fb2378d63bc262b67a7bbd", "name": "import-lazy", "description": "Import a module lazily", "dist-tags": { "latest": "4.0.0" }, "versions": { "2.1.0": { "name": "import-lazy", "version": "2.1.0", "description": "Import modules lazily", "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/sindresorhus/import-lazy.git" }, "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "contributors": [ { "name": "Jorge Bucaran", "email": "jbucaran@me.com" } ], "engines": { "node": ">=4" }, "scripts": { "test": "xo && ava" }, "files": [ "index.js" ], "keywords": [ "import", "require", "load", "module", "modules", "lazy", "lazily", "defer", "deferred", "proxy", "proxies" ], "devDependencies": { "ava": "*", "xo": "*" }, "gitHead": "ed6c2fac31aaf8a7d91a27295756383487f3965d", "bugs": { "url": "https://github.com/sindresorhus/import-lazy/issues" }, "homepage": "https://github.com/sindresorhus/import-lazy#readme", "_id": "import-lazy@2.1.0", "_shasum": "05698e3d45c88e8d7e9d92cb0584e77f096f3e43", "_from": ".", "_npmVersion": "2.15.11", "_nodeVersion": "4.8.3", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "dist": { "shasum": "05698e3d45c88e8d7e9d92cb0584e77f096f3e43", "tarball": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz" }, "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/import-lazy-2.1.0.tgz_1495360148006_0.7086837058886886" }, "directories": {} }, "3.0.0": { "name": "import-lazy", "version": "3.0.0", "description": "Import a module lazily", "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/sindresorhus/import-lazy.git" }, "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "contributors": [ { "name": "Jorge Bucaran", "email": "jbucaran@me.com" } ], "engines": { "node": ">=6" }, "scripts": { "test": "xo && ava" }, "files": [ "index.js" ], "keywords": [ "import", "require", "load", "module", "modules", "lazy", "lazily", "defer", "deferred", "proxy", "proxies" ], "devDependencies": { "ava": "*", "xo": "*" }, "gitHead": "e2fb3c26c104322690d84668bcde193bec7b14fa", "bugs": { "url": "https://github.com/sindresorhus/import-lazy/issues" }, "homepage": "https://github.com/sindresorhus/import-lazy#readme", "_id": "import-lazy@3.0.0", "_shasum": "aac9d230dd073097ba05c34bc39b8b03c586c064", "_from": ".", "_npmVersion": "3.10.8", "_nodeVersion": "6.9.1", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "dist": { "shasum": "aac9d230dd073097ba05c34bc39b8b03c586c064", "tarball": "https://registry.npmjs.org/import-lazy/-/import-lazy-3.0.0.tgz" }, "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/import-lazy-3.0.0.tgz_1497466243296_0.5274067285936326" }, "directories": {} }, "3.1.0": { "name": "import-lazy", "version": "3.1.0", "description": "Import a module lazily", "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/sindresorhus/import-lazy.git" }, "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "engines": { "node": ">=6" }, "scripts": { "test": "xo && ava" }, "files": [ "index.js" ], "keywords": [ "import", "require", "load", "module", "modules", "lazy", "lazily", "defer", "deferred", "proxy", "proxies" ], "devDependencies": { "ava": "*", "xo": "*" }, "gitHead": "9a1bbfe4f7e3618f8e6934372417251b5f219554", "bugs": { "url": "https://github.com/sindresorhus/import-lazy/issues" }, "homepage": "https://github.com/sindresorhus/import-lazy#readme", "_id": "import-lazy@3.1.0", "_npmVersion": "5.4.2", "_nodeVersion": "8.7.0", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "dist": { "integrity": "sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ==", "shasum": "891279202c8a2280fdbd6674dbd8da1a1dfc67cc", "tarball": "https://registry.npmjs.org/import-lazy/-/import-lazy-3.1.0.tgz" }, "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/import-lazy-3.1.0.tgz_1509719453349_0.6365024524275213" }, "directories": {} }, "4.0.0": { "name": "import-lazy", "version": "4.0.0", "description": "Import a module lazily", "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/sindresorhus/import-lazy.git" }, "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "engines": { "node": ">=8" }, "scripts": { "test": "xo && ava && tsd" }, "keywords": [ "import", "require", "load", "module", "modules", "lazy", "lazily", "defer", "deferred", "proxy", "proxies" ], "devDependencies": { "ava": "^1.4.1", "tsd": "^0.7.2", "xo": "^0.24.0" }, "gitHead": "eb40edcf6242280c68289758db9c22c5ecb455d6", "bugs": { "url": "https://github.com/sindresorhus/import-lazy/issues" }, "homepage": "https://github.com/sindresorhus/import-lazy#readme", "_id": "import-lazy@4.0.0", "_nodeVersion": "10.15.3", "_npmVersion": "6.9.0", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "dist": { "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==", "shasum": "e8eb627483a0a43da3c03f3e35548be5cb0cc153", "tarball": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz", "fileCount": 5, "unpackedSize": 4898, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcxDIECRA9TVsSAnZWagAAl9QQAKTyAOspwQDeUAfngBFV\n1l4bOvKuO99sx6jtR3l6SRbpQr5eo1wGO2OtnM3s+rsEb6O7iK7AN9tSWXhy\nbSrCm5gwU22sjqYWkUfamrouubYpP6Q5OZ7caBZVITFtfUSfOhXYNLktIdVp\nccMN7Wwh2yrw7cAcF6g7oGpvON+aifJ8tXErp9DV1z6Db5shWWdBBIDUbVfj\nnW+wnlC8TV6oDkwdasbKOCHSU4Yo7iD/PzzQC3sd9/3hHA9u8PjIrz916WPS\nHD3wBJsvMcxYIYd3bmNaP0zvIe6VtFRZYiTU+j4NkvhlQ4+kiAVMVhotqtzM\ntBiLK21Fs7iPILHW/lUOAyCqWjBJbmFRIInlaruhh9+btvHHqt2znqidJT0G\nhXRiLnbR4kKnW2xzmN43+JJKEWno26s/axVF/EMHT+EA7do/zEjk5Mo10atM\nk0Io9h4L2Ll9PYT1GR1SP8TWHXsRMjihEaVWHC64a2XcucHlzorUQeToww7m\nVVc1+oLA3qGw9r/UxiLg8QXVbdBlpoaMUtoPc6jbymiFTXzaRKaC9Yzo2vUm\nIWlzVS5lDc11Ak9+478wfrzojzOD5vFnFVK6GB3WYJYU7GrxPxAGHhs+QNS2\nkFI3n4Gd4dFrvvD4Qvhnl6CNst7B2MN+xY6W7L/vRR2Q9KhZMINVODDCG6ZV\nrZ8/\r\n=+VI4\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/import-lazy_4.0.0_1556361731280_0.9162848531790553" }, "_hasShrinkwrap": false } }, "readme": "# import-lazy [![Build Status](https://travis-ci.org/sindresorhus/import-lazy.svg?branch=master)](https://travis-ci.org/sindresorhus/import-lazy)\n\n> Import a module lazily\n\n\n## Install\n\n```\n$ npm install import-lazy\n```\n\n\n## Usage\n\n```js\n// Pass in `require` or a custom import function\nconst importLazy = require('import-lazy')(require);\nconst _ = importLazy('lodash');\n\n// Instead of referring to its exported properties directly…\n_.isNumber(2);\n\n// …it's cached on consecutive calls\n_.isNumber('unicorn');\n\n// Works out of the box for functions and regular properties\nconst stuff = importLazy('./math-lib');\nconsole.log(stuff.sum(1, 2)); // => 3\nconsole.log(stuff.PHI); // => 1.618033\n```\n\n### Warning: Destructuring will cause it to fetch eagerly\n\nWhile you may be tempted to do leverage destructuring, like this:\n\n```js\nconst {isNumber, isString} = importLazy('lodash');\n```\n\nNote that this will cause immediate property access, negating the lazy loading, and is equivalent to:\n\n```js\nimport {isNumber, isString} from 'lodash';\n```\n\n## Related\n\n- [resolve-from](https://github.com/sindresorhus/resolve-from) - Resolve the path of a module from a given path\n- [import-from](https://github.com/sindresorhus/import-from) - Import a module from a given path\n- [resolve-pkg](https://github.com/sindresorhus/resolve-pkg) - Resolve the path of a package regardless of it having an entry point\n- [lazy-value](https://github.com/sindresorhus/lazy-value) - Create a lazily evaluated value\n- [define-lazy-prop](https://github.com/sindresorhus/define-lazy-prop) - Define a lazily evaluated property on an object\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n", "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "time": { "modified": "2019-04-27T10:42:14.005Z", "created": "2017-05-21T09:49:08.163Z", "2.1.0": "2017-05-21T09:49:08.163Z", "3.0.0": "2017-06-14T18:50:44.279Z", "3.1.0": "2017-11-03T14:30:53.408Z", "4.0.0": "2019-04-27T10:42:11.495Z" }, "homepage": "https://github.com/sindresorhus/import-lazy#readme", "keywords": [ "import", "require", "load", "module", "modules", "lazy", "lazily", "defer", "deferred", "proxy", "proxies" ], "repository": { "type": "git", "url": "git+https://github.com/sindresorhus/import-lazy.git" }, "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { "url": "https://github.com/sindresorhus/import-lazy/issues" }, "license": "MIT", "readmeFilename": "readme.md" }