mirror of
https://gitlab.com/octtspacc/staticoso
synced 2025-06-05 22:09:23 +02:00
Transition to monorepo on a new Dev branch
This commit is contained in:
21
App/Source/node_modules/lazy-cache/LICENSE
generated
vendored
Normal file
21
App/Source/node_modules/lazy-cache/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015-2016, Jon Schlinkert.
|
||||
|
||||
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.
|
67
App/Source/node_modules/lazy-cache/index.js
generated
vendored
Normal file
67
App/Source/node_modules/lazy-cache/index.js
generated
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Cache results of the first function call to ensure only calling once.
|
||||
*
|
||||
* ```js
|
||||
* var utils = require('lazy-cache')(require);
|
||||
* // cache the call to `require('ansi-yellow')`
|
||||
* utils('ansi-yellow', 'yellow');
|
||||
* // use `ansi-yellow`
|
||||
* console.log(utils.yellow('this is yellow'));
|
||||
* ```
|
||||
*
|
||||
* @param {Function} `fn` Function that will be called only once.
|
||||
* @return {Function} Function that can be called to get the cached function
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function lazyCache(fn) {
|
||||
var cache = {};
|
||||
var proxy = function(mod, name) {
|
||||
name = name || camelcase(mod);
|
||||
|
||||
// check both boolean and string in case `process.env` cases to string
|
||||
if (process.env.UNLAZY === 'true' || process.env.UNLAZY === true || process.env.TRAVIS) {
|
||||
cache[name] = fn(mod);
|
||||
}
|
||||
|
||||
Object.defineProperty(proxy, name, {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
get: getter
|
||||
});
|
||||
|
||||
function getter() {
|
||||
if (cache.hasOwnProperty(name)) {
|
||||
return cache[name];
|
||||
}
|
||||
return (cache[name] = fn(mod));
|
||||
}
|
||||
return getter;
|
||||
};
|
||||
return proxy;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to camelcase the name to be stored on the `lazy` object.
|
||||
*
|
||||
* @param {String} `str` String containing `_`, `.`, `-` or whitespace that will be camelcased.
|
||||
* @return {String} camelcased string.
|
||||
*/
|
||||
|
||||
function camelcase(str) {
|
||||
if (str.length === 1) {
|
||||
return str.toLowerCase();
|
||||
}
|
||||
str = str.replace(/^[\W_]+|[\W_]+$/g, '').toLowerCase();
|
||||
return str.replace(/[\W_]+(\w|$)/g, function(_, ch) {
|
||||
return ch.toUpperCase();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Expose `lazyCache`
|
||||
*/
|
||||
|
||||
module.exports = lazyCache;
|
58
App/Source/node_modules/lazy-cache/package.json
generated
vendored
Normal file
58
App/Source/node_modules/lazy-cache/package.json
generated
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
{
|
||||
"name": "lazy-cache",
|
||||
"description": "Cache requires to be lazy-loaded when needed.",
|
||||
"version": "1.0.4",
|
||||
"homepage": "https://github.com/jonschlinkert/lazy-cache",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"repository": "jonschlinkert/lazy-cache",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/lazy-cache/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ansi-yellow": "^0.1.1",
|
||||
"glob": "^7.0.3",
|
||||
"gulp-format-md": "^0.1.8",
|
||||
"mocha": "^2.4.5"
|
||||
},
|
||||
"keywords": [
|
||||
"cache",
|
||||
"caching",
|
||||
"dependencies",
|
||||
"dependency",
|
||||
"lazy",
|
||||
"require",
|
||||
"requires"
|
||||
],
|
||||
"verb": {
|
||||
"related": {
|
||||
"list": [
|
||||
"lint-deps"
|
||||
]
|
||||
},
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
},
|
||||
"reflinks": [
|
||||
"verb"
|
||||
]
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user