Galerie und tage
This commit is contained in:
26
node_modules/import-lazy/index.js
generated
vendored
26
node_modules/import-lazy/index.js
generated
vendored
@@ -1,26 +0,0 @@
|
||||
'use strict';
|
||||
const lazy = (mod, fn, id) => mod === undefined ? fn(id) : mod;
|
||||
|
||||
module.exports = fn => {
|
||||
return id => {
|
||||
let mod;
|
||||
|
||||
const handler = {
|
||||
get: (target, property) => {
|
||||
mod = lazy(mod, fn, id);
|
||||
return Reflect.get(mod, property);
|
||||
},
|
||||
apply: (target, thisArg, argumentsList) => {
|
||||
mod = lazy(mod, fn, id);
|
||||
return Reflect.apply(mod, thisArg, argumentsList);
|
||||
},
|
||||
construct: (target, argumentsList) => {
|
||||
mod = lazy(mod, fn, id);
|
||||
return Reflect.construct(mod, argumentsList);
|
||||
}
|
||||
};
|
||||
|
||||
// eslint-disable-next-line prefer-arrow-callback
|
||||
return new Proxy(function () {}, handler);
|
||||
};
|
||||
};
|
||||
9
node_modules/import-lazy/license
generated
vendored
9
node_modules/import-lazy/license
generated
vendored
@@ -1,9 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
70
node_modules/import-lazy/package.json
generated
vendored
70
node_modules/import-lazy/package.json
generated
vendored
@@ -1,70 +0,0 @@
|
||||
{
|
||||
"_from": "import-lazy@^3.1.0",
|
||||
"_id": "import-lazy@3.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ==",
|
||||
"_location": "/import-lazy",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "import-lazy@^3.1.0",
|
||||
"name": "import-lazy",
|
||||
"escapedName": "import-lazy",
|
||||
"rawSpec": "^3.1.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^3.1.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/bin-wrapper"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-3.1.0.tgz",
|
||||
"_shasum": "891279202c8a2280fdbd6674dbd8da1a1dfc67cc",
|
||||
"_spec": "import-lazy@^3.1.0",
|
||||
"_where": "/var/www/html/jason/WeihnachtenMelly/node_modules/bin-wrapper",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/import-lazy/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Import a module lazily",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/import-lazy#readme",
|
||||
"keywords": [
|
||||
"import",
|
||||
"require",
|
||||
"load",
|
||||
"module",
|
||||
"modules",
|
||||
"lazy",
|
||||
"lazily",
|
||||
"defer",
|
||||
"deferred",
|
||||
"proxy",
|
||||
"proxies"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "import-lazy",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/import-lazy.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "3.1.0"
|
||||
}
|
||||
49
node_modules/import-lazy/readme.md
generated
vendored
49
node_modules/import-lazy/readme.md
generated
vendored
@@ -1,49 +0,0 @@
|
||||
# import-lazy [](https://travis-ci.org/sindresorhus/import-lazy)
|
||||
|
||||
> Import a module lazily
|
||||
|
||||
Note: Version 3 is exclusively `Proxy`-based and requires Node.js 6+. Use [version 2](https://github.com/sindresorhus/import-lazy/tree/ed6c2fac31aaf8a7d91a27295756383487f3965d) if you need Node.js <=5 support.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install import-lazy
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// Pass in `require` or a custom import function
|
||||
const importLazy = require('import-lazy')(require);
|
||||
const _ = importLazy('lodash');
|
||||
|
||||
// Instead of referring to its exported properties directly…
|
||||
_.isNumber(2);
|
||||
|
||||
// …it's cached on consecutive calls
|
||||
_.isNumber('unicorn');
|
||||
|
||||
// It also works using destructuring assignment in ES2015
|
||||
const {isNumber, isString} = importLazy('lodash');
|
||||
|
||||
// Works out of the box for functions and regular properties
|
||||
const stuff = importLazy('./math-lib');
|
||||
console.log(stuff.sum(1, 2)); // => 3
|
||||
console.log(stuff.PHI); // => 1.618033
|
||||
```
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [resolve-from](https://github.com/sindresorhus/resolve-from) - Resolve the path of a module from a given path
|
||||
- [import-from](https://github.com/sindresorhus/import-from) - Import a module from a given path
|
||||
- [resolve-pkg](https://github.com/sindresorhus/resolve-pkg) - Resolve the path of a package regardless of it having an entry point
|
||||
- [lazy-value](https://github.com/sindresorhus/lazy-value) - Create a lazily evaluated value
|
||||
- [define-lazy-prop](https://github.com/sindresorhus/define-lazy-prop) - Define a lazily evaluated property on an object
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
Reference in New Issue
Block a user