From b22f6770c8bd084d66950655203c61dd701b3d90 Mon Sep 17 00:00:00 2001 From: Minteck Date: Sat, 4 Jun 2022 08:51:19 +0200 Subject: Remove node_modules --- node_modules/import-lazy/index.js | 53 ----------------------------- node_modules/import-lazy/license | 21 ------------ node_modules/import-lazy/package.json | 44 ------------------------ node_modules/import-lazy/readme.md | 64 ----------------------------------- 4 files changed, 182 deletions(-) delete mode 100644 node_modules/import-lazy/index.js delete mode 100644 node_modules/import-lazy/license delete mode 100644 node_modules/import-lazy/package.json delete mode 100644 node_modules/import-lazy/readme.md (limited to 'node_modules/import-lazy') diff --git a/node_modules/import-lazy/index.js b/node_modules/import-lazy/index.js deleted file mode 100644 index 307f08f..0000000 --- a/node_modules/import-lazy/index.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; -const lazy = (mod, fn, id) => mod === undefined ? fn(id) : mod; - -module.exports = fn => { - return id => { - let mod; - - return function () { - if (arguments.length === 0) { - mod = lazy(mod, fn, id); - return mod; - } - - const ret = {}; - - [].forEach.call(arguments, prop => { - Object.defineProperty(ret, prop, { - get: () => { - mod = lazy(mod, fn, id); - if (typeof mod[prop] === 'function') { - return function () { - return mod[prop].apply(mod, arguments); - }; - } - - return mod[prop]; - } - }); - }); - - return ret; - }; - }; -}; - -module.exports.proxy = 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); - } - }; - - return new Proxy(() => {}, handler); - }; -}; diff --git a/node_modules/import-lazy/license b/node_modules/import-lazy/license deleted file mode 100644 index 654d0bf..0000000 --- a/node_modules/import-lazy/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (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. diff --git a/node_modules/import-lazy/package.json b/node_modules/import-lazy/package.json deleted file mode 100644 index 89d80b6..0000000 --- a/node_modules/import-lazy/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "import-lazy", - "version": "2.1.0", - "description": "Import modules lazily", - "license": "MIT", - "repository": "sindresorhus/import-lazy", - "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": "*" - } -} diff --git a/node_modules/import-lazy/readme.md b/node_modules/import-lazy/readme.md deleted file mode 100644 index 233e42e..0000000 --- a/node_modules/import-lazy/readme.md +++ /dev/null @@ -1,64 +0,0 @@ -# import-lazy [![Build Status](https://travis-ci.org/sindresorhus/import-lazy.svg?branch=master)](https://travis-ci.org/sindresorhus/import-lazy) - -> Import modules lazily - - -## Install - -``` -$ npm install --save import-lazy -``` - - -## Usage - -```js -// Pass in `require` or a custom import function -const importLazy = require('import-lazy')(require); -const _ = importLazy('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'); - -// Extract lazy variations of the props you need -const members = importLazy('lodash')('isNumber', 'isString'); - -// Useful when using destructuring assignment in ES2015 -const {isNumber, isString} = importLazy('lodash')('isNumber', 'isString'); - -// Works out of the box for functions and regular properties -const stuff = importLazy('./math-lib')('sum', 'PHI'); -console.log(stuff.sum(1, 2)); // => 3 -console.log(stuff.PHI); // => 1.618033 -``` - -### Proxy support in Node.js 6 or later - -If you use Node.js 6 or later, you can take advantage of ES2015 proxies and don't need to call it as a function. - -```js -const importLazy = require('import-lazy').proxy(require); -const _ = importLazy('lodash'); - -// No need to call it as a function but still lazily imported -_.isNumber(2); -``` - -## 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) -- cgit