aboutsummaryrefslogtreecommitdiff
path: root/node_modules/cache-base
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-12-10 21:51:33 +0100
committerFlorian Dold <florian.dold@gmail.com>2017-12-10 21:51:33 +0100
commit0469abd4a9c9270a1fdc962969e36e63699af8b4 (patch)
treef9864d4a4148621378958794cbbfdc2393733283 /node_modules/cache-base
parent6947e79bbc258f7bc96af424ddb71a511f0c15a3 (diff)
upgrade dependencies
Diffstat (limited to 'node_modules/cache-base')
-rw-r--r--node_modules/cache-base/LICENSE4
-rw-r--r--node_modules/cache-base/README.md24
-rw-r--r--node_modules/cache-base/index.js42
-rw-r--r--node_modules/cache-base/package.json28
-rw-r--r--node_modules/cache-base/utils.js38
5 files changed, 56 insertions, 80 deletions
diff --git a/node_modules/cache-base/LICENSE b/node_modules/cache-base/LICENSE
index d734237bd..943e71d05 100644
--- a/node_modules/cache-base/LICENSE
+++ b/node_modules/cache-base/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2014-2017, Jon Schlinkert
+Copyright (c) 2014-2017, 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
@@ -18,4 +18,4 @@ 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.
+THE SOFTWARE. \ No newline at end of file
diff --git a/node_modules/cache-base/README.md b/node_modules/cache-base/README.md
index 130a4e211..62c6ffeb6 100644
--- a/node_modules/cache-base/README.md
+++ b/node_modules/cache-base/README.md
@@ -1,4 +1,4 @@
-# cache-base [![NPM version](https://img.shields.io/npm/v/cache-base.svg?style=flat)](https://www.npmjs.com/package/cache-base) [![NPM monthly downloads](https://img.shields.io/npm/dm/cache-base.svg?style=flat)](https://npmjs.org/package/cache-base) [![NPM total downloads](https://img.shields.io/npm/dt/cache-base.svg?style=flat)](https://npmjs.org/package/cache-base) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/cache-base.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/cache-base)
+# cache-base [![NPM version](https://img.shields.io/npm/v/cache-base.svg?style=flat)](https://www.npmjs.com/package/cache-base) [![NPM monthly downloads](https://img.shields.io/npm/dm/cache-base.svg?style=flat)](https://npmjs.org/package/cache-base) [![NPM total downloads](https://img.shields.io/npm/dt/cache-base.svg?style=flat)](https://npmjs.org/package/cache-base) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/cache-base.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/cache-base)
> Basic object cache with `get`, `set`, `del`, and `has` methods for node.js/javascript projects.
@@ -63,7 +63,7 @@ console.log(app.data);
## API
-### [namespace](index.js#L21)
+### [namespace](index.js#L29)
Create a `Cache` constructor that when instantiated will store values on the given `prop`.
@@ -82,7 +82,7 @@ cache.set('foo', 'bar');
//=> {data: {foo: 'bar'}}
```
-### [Cache](index.js#L35)
+### [Cache](index.js#L43)
Create a new `Cache`. Internally the `Cache` constructor is created using the `namespace` function, with `cache` defined as the storage object.
@@ -96,7 +96,7 @@ Create a new `Cache`. Internally the `Cache` constructor is created using the `n
var app = new Cache();
```
-### [.set](index.js#L76)
+### [.set](index.js#L84)
Assign `value` to `key`. Also emits `set` with the key and value.
@@ -126,7 +126,7 @@ console.log(app);
//=> {name: 'Halle', foo: 'bar', baz: 'quux'}
```
-### [.union](index.js#L106)
+### [.union](index.js#L114)
Union `array` to `key`. Also emits `set` with the key and value.
@@ -145,7 +145,7 @@ console.log(app.get('a'));
//=> {b: ['foo', 'bar']}
```
-### [.get](index.js#L136)
+### [.get](index.js#L144)
Return the value of `key`. Dot notation may be used to get [nested property values](https://github.com/jonschlinkert/get-value).
@@ -169,7 +169,7 @@ app.get(['a', 'b']);
//=> {c: 'd'}
```
-### [.has](index.js#L163)
+### [.has](index.js#L171)
Return true if app has a stored value for `key`, false only if value is `undefined`.
@@ -190,7 +190,7 @@ app.has('foo');
//=> true
```
-### [.del](index.js#L191)
+### [.del](index.js#L199)
Delete one or more properties from the instance.
@@ -213,7 +213,7 @@ app.del('foo');
app.del(['foo', 'bar']);
```
-### [.clear](index.js#L210)
+### [.clear](index.js#L218)
Reset the entire cache to an empty object.
@@ -223,7 +223,7 @@ Reset the entire cache to an empty object.
app.clear();
```
-### [.visit](index.js#L227)
+### [.visit](index.js#L235)
Visit `method` over the properties in the given object, or map
visit over the object-elements in an array.
@@ -253,7 +253,7 @@ Pull requests and stars are always welcome. For bugs and feature requests, [plea
| **Commits** | **Contributor** |
| --- | --- |
-| 51 | [jonschlinkert](https://github.com/jonschlinkert) |
+| 54 | [jonschlinkert](https://github.com/jonschlinkert) |
| 2 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |
### Building docs
@@ -288,4 +288,4 @@ Released under the [MIT License](LICENSE).
***
-_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 25, 2017._ \ No newline at end of file
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 22, 2017._ \ No newline at end of file
diff --git a/node_modules/cache-base/index.js b/node_modules/cache-base/index.js
index 473f5f3ea..412802455 100644
--- a/node_modules/cache-base/index.js
+++ b/node_modules/cache-base/index.js
@@ -1,6 +1,14 @@
'use strict';
-var utils = require('./utils');
+var isObject = require('isobject');
+var Emitter = require('component-emitter');
+var visit = require('collection-visit');
+var toPath = require('to-object-path');
+var union = require('union-value');
+var del = require('unset-value');
+var get = require('get-value');
+var has = require('has-value');
+var set = require('set-value');
/**
* Create a `Cache` constructor that when instantiated will
@@ -45,7 +53,7 @@ function namespace(prop) {
* Inherit Emitter
*/
- utils.Emitter(Cache.prototype);
+ Emitter(Cache.prototype);
/**
* Assign `value` to `key`. Also emits `set` with
@@ -75,12 +83,12 @@ function namespace(prop) {
Cache.prototype.set = function(key, val) {
if (Array.isArray(key) && arguments.length === 2) {
- key = utils.toPath(key);
+ key = toPath(key);
}
- if (utils.isObject(key) || Array.isArray(key)) {
+ if (isObject(key) || Array.isArray(key)) {
this.visit('set', key);
} else {
- utils.set(prop ? this[prop] : this, key, val);
+ set(prop ? this[prop] : this, key, val);
this.emit('set', key, val);
}
return this;
@@ -105,10 +113,10 @@ function namespace(prop) {
Cache.prototype.union = function(key, val) {
if (Array.isArray(key) && arguments.length === 2) {
- key = utils.toPath(key);
+ key = toPath(key);
}
var ctx = prop ? this[prop] : this;
- utils.union(ctx, key, utils.arrayify(val));
+ union(ctx, key, arrayify(val));
this.emit('union', val);
return this;
};
@@ -134,10 +142,10 @@ function namespace(prop) {
*/
Cache.prototype.get = function(key) {
- key = utils.toPath(arguments);
+ key = toPath(arguments);
var ctx = prop ? this[prop] : this;
- var val = utils.get(ctx, key);
+ var val = get(ctx, key);
this.emit('get', key, val);
return val;
@@ -161,10 +169,10 @@ function namespace(prop) {
*/
Cache.prototype.has = function(key) {
- key = utils.toPath(arguments);
+ key = toPath(arguments);
var ctx = prop ? this[prop] : this;
- var val = utils.get(ctx, key);
+ var val = get(ctx, key);
var has = typeof val !== 'undefined';
this.emit('has', key, has);
@@ -192,7 +200,7 @@ function namespace(prop) {
if (Array.isArray(key)) {
this.visit('del', key);
} else {
- utils.del(prop ? this[prop] : this, key);
+ del(prop ? this[prop] : this, key);
this.emit('del', key);
}
return this;
@@ -225,7 +233,7 @@ function namespace(prop) {
*/
Cache.prototype.visit = function(method, val) {
- utils.visit(this, method, val);
+ visit(this, method, val);
return this;
};
@@ -233,6 +241,14 @@ function namespace(prop) {
}
/**
+ * Cast val to an array
+ */
+
+function arrayify(val) {
+ return val ? (Array.isArray(val) ? val : [val]) : [];
+}
+
+/**
* Expose `Cache`
*/
diff --git a/node_modules/cache-base/package.json b/node_modules/cache-base/package.json
index fb20e591e..fd88a1104 100644
--- a/node_modules/cache-base/package.json
+++ b/node_modules/cache-base/package.json
@@ -1,12 +1,12 @@
{
"name": "cache-base",
"description": "Basic object cache with `get`, `set`, `del`, and `has` methods for node.js/javascript projects.",
- "version": "0.8.5",
+ "version": "1.0.1",
"homepage": "https://github.com/jonschlinkert/cache-base",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"contributors": [
- "<wtgtybhertgeghgtwtg@gmail.com> (https://github.com/wtgtybhertgeghgtwtg)",
- "Jon Schlinkert <jon.schlinkert@sellside.com> (http://twitter.com/jonschlinkert)"
+ "Jon Schlinkert (http://twitter.com/jonschlinkert)",
+ "(https://github.com/wtgtybhertgeghgtwtg)"
],
"repository": "jonschlinkert/cache-base",
"bugs": {
@@ -14,8 +14,7 @@
},
"license": "MIT",
"files": [
- "index.js",
- "utils.js"
+ "index.js"
],
"main": "index.js",
"engines": {
@@ -25,20 +24,19 @@
"test": "mocha"
},
"dependencies": {
- "collection-visit": "^0.2.1",
+ "collection-visit": "^1.0.0",
"component-emitter": "^1.2.1",
- "get-value": "^2.0.5",
- "has-value": "^0.3.1",
- "isobject": "^3.0.0",
- "lazy-cache": "^2.0.1",
- "set-value": "^0.4.2",
+ "get-value": "^2.0.6",
+ "has-value": "^1.0.0",
+ "isobject": "^3.0.1",
+ "set-value": "^2.0.0",
"to-object-path": "^0.3.0",
- "union-value": "^0.2.3",
- "unset-value": "^0.1.1"
+ "union-value": "^1.0.0",
+ "unset-value": "^1.0.0"
},
"devDependencies": {
- "gulp-format-md": "^0.1.8",
- "mocha": "^2.4.5"
+ "gulp-format-md": "^1.0.0",
+ "mocha": "^3.4.2"
},
"keywords": [
"base",
diff --git a/node_modules/cache-base/utils.js b/node_modules/cache-base/utils.js
deleted file mode 100644
index 5b1740a2b..000000000
--- a/node_modules/cache-base/utils.js
+++ /dev/null
@@ -1,38 +0,0 @@
-'use strict';
-
-/**
- * Module dependencies
- */
-
-var utils = require('lazy-cache')(require);
-var fn = require;
-require = utils;
-
-/**
- * Lazily required module dependencies
- */
-
-require('component-emitter', 'Emitter');
-require('collection-visit', 'visit');
-require('isobject', 'isObject');
-require('unset-value', 'del');
-require('get-value', 'get');
-require('has-value', 'has');
-require('set-value', 'set');
-require('union-value', 'union');
-require('to-object-path', 'toPath');
-require = fn;
-
-/**
- * Cast val to an array
- */
-
-utils.arrayify = function(val) {
- return val ? (Array.isArray(val) ? val : [val]) : [];
-};
-
-/**
- * Expose `utils` modules
- */
-
-module.exports = utils;