initial commit taken from gitlab.lrz.de

This commit is contained in:
privatereese
2018-08-24 18:09:42 +02:00
parent ae54ed4c48
commit fc05486403
28494 changed files with 2159823 additions and 0 deletions

21
node_modules/base/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015-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
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.

491
node_modules/base/README.md generated vendored Normal file
View File

@@ -0,0 +1,491 @@
<p align="center">
<a href="https://github.com/node-base/base">
<img height="250" width="250" src="https://raw.githubusercontent.com/node-base/base/master/docs/logo.png">
</a>
</p>
# base [![NPM version](https://img.shields.io/npm/v/base.svg?style=flat)](https://www.npmjs.com/package/base) [![NPM monthly downloads](https://img.shields.io/npm/dm/base.svg?style=flat)](https://npmjs.org/package/base) [![NPM total downloads](https://img.shields.io/npm/dt/base.svg?style=flat)](https://npmjs.org/package/base) [![Linux Build Status](https://img.shields.io/travis/node-base/base.svg?style=flat&label=Travis)](https://travis-ci.org/node-base/base)
> base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting with a handful of common methods, like `set`, `get`, `del` and `use`.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save base
```
## What is Base?
Base is a framework for rapidly creating high quality node.js applications, using plugins like building blocks.
### Guiding principles
The core team follows these principles to help guide API decisions:
* **Compact API surface**: The smaller the API surface, the easier the library will be to learn and use.
* **Easy to extend**: Implementors can use any npm package, and write plugins in pure JavaScript. If you're building complex apps, Base simplifies inheritance.
* **Easy to test**: No special setup should be required to unit test `Base` or base plugins
### Minimal API surface
[The API](#api) was designed to provide only the minimum necessary functionality for creating a useful application, with or without [plugins](#plugins).
**Base core**
Base itself ships with only a handful of [useful methods](#api), such as:
* `.set`: for setting values on the instance
* `.get`: for getting values from the instance
* `.has`: to check if a property exists on the instance
* `.define`: for setting non-enumerable values on the instance
* `.use`: for adding plugins
**Be generic**
When deciding on method to add or remove, we try to answer these questions:
1. Will all or most Base applications need this method?
2. Will this method encourage practices or enforce conventions that are beneficial to implementors?
3. Can or should this be done in a plugin instead?
### Composability
**Plugin system**
It couldn't be easier to extend Base with any features or custom functionality you can think of.
Base plugins are just functions that take an instance of `Base`:
```js
var base = new Base();
function plugin(base) {
// do plugin stuff, in pure JavaScript
}
// use the plugin
base.use(plugin);
```
**Inheritance**
Easily inherit Base using `.extend`:
```js
var Base = require('base');
function MyApp() {
Base.call(this);
}
Base.extend(MyApp);
var app = new MyApp();
app.set('a', 'b');
app.get('a');
//=> 'b';
```
**Inherit or instantiate with a namespace**
By default, the `.get`, `.set` and `.has` methods set and get values from the root of the `base` instance. You can customize this using the `.namespace` method exposed on the exported function. For example:
```js
var Base = require('base');
// get and set values on the `base.cache` object
var base = Base.namespace('cache');
var app = base();
app.set('foo', 'bar');
console.log(app.cache.foo);
//=> 'bar'
```
## API
**Usage**
```js
var Base = require('base');
var app = new Base();
app.set('foo', 'bar');
console.log(app.foo);
//=> 'bar'
```
### [Base](index.js#L44)
Create an instance of `Base` with the given `config` and `options`.
**Params**
* `config` **{Object}**: If supplied, this object is passed to [cache-base](https://github.com/jonschlinkert/cache-base) to merge onto the the instance upon instantiation.
* `options` **{Object}**: If supplied, this object is used to initialize the `base.options` object.
**Example**
```js
// initialize with `config` and `options`
var app = new Base({isApp: true}, {abc: true});
app.set('foo', 'bar');
// values defined with the given `config` object will be on the root of the instance
console.log(app.baz); //=> undefined
console.log(app.foo); //=> 'bar'
// or use `.get`
console.log(app.get('isApp')); //=> true
console.log(app.get('foo')); //=> 'bar'
// values defined with the given `options` object will be on `app.options
console.log(app.options.abc); //=> true
```
### [.is](index.js#L107)
Set the given `name` on `app._name` and `app.is*` properties. Used for doing lookups in plugins.
**Params**
* `name` **{String}**
* `returns` **{Boolean}**
**Example**
```js
app.is('foo');
console.log(app._name);
//=> 'foo'
console.log(app.isFoo);
//=> true
app.is('bar');
console.log(app.isFoo);
//=> true
console.log(app.isBar);
//=> true
console.log(app._name);
//=> 'bar'
```
### [.isRegistered](index.js#L145)
Returns true if a plugin has already been registered on an instance.
Plugin implementors are encouraged to use this first thing in a plugin
to prevent the plugin from being called more than once on the same
instance.
**Params**
* `name` **{String}**: The plugin name.
* `register` **{Boolean}**: If the plugin if not already registered, to record it as being registered pass `true` as the second argument.
* `returns` **{Boolean}**: Returns true if a plugin is already registered.
**Events**
* `emits`: `plugin` Emits the name of the plugin being registered. Useful for unit tests, to ensure plugins are only registered once.
**Example**
```js
var base = new Base();
base.use(function(app) {
if (app.isRegistered('myPlugin')) return;
// do stuff to `app`
});
// to also record the plugin as being registered
base.use(function(app) {
if (app.isRegistered('myPlugin', true)) return;
// do stuff to `app`
});
```
### [.use](index.js#L175)
Define a plugin function to be called immediately upon init. Plugins are chainable and expose the following arguments to the plugin function:
* `app`: the current instance of `Base`
* `base`: the [first ancestor instance](#base) of `Base`
**Params**
* `fn` **{Function}**: plugin function to call
* `returns` **{Object}**: Returns the item instance for chaining.
**Example**
```js
var app = new Base()
.use(foo)
.use(bar)
.use(baz)
```
### [.define](index.js#L197)
The `.define` method is used for adding non-enumerable property on the instance. Dot-notation is **not supported** with `define`.
**Params**
* `key` **{String}**: The name of the property to define.
* `value` **{any}**
* `returns` **{Object}**: Returns the instance for chaining.
**Example**
```js
// arbitrary `render` function using lodash `template`
app.define('render', function(str, locals) {
return _.template(str)(locals);
});
```
### [.mixin](index.js#L222)
Mix property `key` onto the Base prototype. If base is inherited using `Base.extend` this method will be overridden by a new `mixin` method that will only add properties to the prototype of the inheriting application.
**Params**
* `key` **{String}**
* `val` **{Object|Array}**
* `returns` **{Object}**: Returns the `base` instance for chaining.
**Example**
```js
app.mixin('foo', function() {
// do stuff
});
```
### [.base](index.js#L268)
Getter/setter used when creating nested instances of `Base`, for storing a reference to the first ancestor instance. This works by setting an instance of `Base` on the `parent` property of a "child" instance. The `base` property defaults to the current instance if no `parent` property is defined.
**Example**
```js
// create an instance of `Base`, this is our first ("base") instance
var first = new Base();
first.foo = 'bar'; // arbitrary property, to make it easier to see what's happening later
// create another instance
var second = new Base();
// create a reference to the first instance (`first`)
second.parent = first;
// create another instance
var third = new Base();
// create a reference to the previous instance (`second`)
// repeat this pattern every time a "child" instance is created
third.parent = second;
// we can always access the first instance using the `base` property
console.log(first.base.foo);
//=> 'bar'
console.log(second.base.foo);
//=> 'bar'
console.log(third.base.foo);
//=> 'bar'
// and now you know how to get to third base ;)
```
### [#use](index.js#L293)
Static method for adding global plugin functions that will be added to an instance when created.
**Params**
* `fn` **{Function}**: Plugin function to use on each instance.
* `returns` **{Object}**: Returns the `Base` constructor for chaining
**Example**
```js
Base.use(function(app) {
app.foo = 'bar';
});
var app = new Base();
console.log(app.foo);
//=> 'bar'
```
### [#extend](index.js#L337)
Static method for inheriting the prototype and static methods of the `Base` class. This method greatly simplifies the process of creating inheritance-based applications. See [static-extend](https://github.com/jonschlinkert/static-extend) for more details.
**Params**
* `Ctor` **{Function}**: constructor to extend
* `methods` **{Object}**: Optional prototype properties to mix in.
* `returns` **{Object}**: Returns the `Base` constructor for chaining
**Example**
```js
var extend = cu.extend(Parent);
Parent.extend(Child);
// optional methods
Parent.extend(Child, {
foo: function() {},
bar: function() {}
});
```
### [#mixin](index.js#L379)
Used for adding methods to the `Base` prototype, and/or to the prototype of child instances. When a mixin function returns a function, the returned function is pushed onto the `.mixins` array, making it available to be used on inheriting classes whenever `Base.mixins()` is called (e.g. `Base.mixins(Child)`).
**Params**
* `fn` **{Function}**: Function to call
* `returns` **{Object}**: Returns the `Base` constructor for chaining
**Example**
```js
Base.mixin(function(proto) {
proto.foo = function(msg) {
return 'foo ' + msg;
};
});
```
### [#mixins](index.js#L401)
Static method for running global mixin functions against a child constructor. Mixins must be registered before calling this method.
**Params**
* `Child` **{Function}**: Constructor function of a child class
* `returns` **{Object}**: Returns the `Base` constructor for chaining
**Example**
```js
Base.extend(Child);
Base.mixins(Child);
```
### [#inherit](index.js#L420)
Similar to `util.inherit`, but copies all static properties, prototype properties, and getters/setters from `Provider` to `Receiver`. See [class-utils](https://github.com/jonschlinkert/class-utils#inherit) for more details.
**Params**
* `Receiver` **{Function}**: Receiving (child) constructor
* `Provider` **{Function}**: Providing (parent) constructor
* `returns` **{Object}**: Returns the `Base` constructor for chaining
**Example**
```js
Base.inherit(Foo, Bar);
```
## In the wild
The following node.js applications were built with `Base`:
* [assemble](https://github.com/assemble/assemble)
* [verb](https://github.com/verbose/verb)
* [generate](https://github.com/generate/generate)
* [scaffold](https://github.com/jonschlinkert/scaffold)
* [boilerplate](https://github.com/jonschlinkert/boilerplate)
## Test coverage
```
Statements : 98.91% ( 91/92 )
Branches : 92.86% ( 26/28 )
Functions : 100% ( 17/17 )
Lines : 98.9% ( 90/91 )
```
## History
### v0.11.2
* fixes https://github.com/micromatch/micromatch/issues/99
### v0.11.0
**Breaking changes**
* Static `.use` and `.run` methods are now non-enumerable
### v0.9.0
**Breaking changes**
* `.is` no longer takes a function, a string must be passed
* all remaining `.debug` code has been removed
* `app._namespace` was removed (related to `debug`)
* `.plugin`, `.use`, and `.define` no longer emit events
* `.assertPlugin` was removed
* `.lazy` was removed
## About
### Related projects
* [base-cwd](https://www.npmjs.com/package/base-cwd): Base plugin that adds a getter/setter for the current working directory. | [homepage](https://github.com/node-base/base-cwd "Base plugin that adds a getter/setter for the current working directory.")
* [base-data](https://www.npmjs.com/package/base-data): adds a `data` method to base-methods. | [homepage](https://github.com/node-base/base-data "adds a `data` method to base-methods.")
* [base-fs](https://www.npmjs.com/package/base-fs): base-methods plugin that adds vinyl-fs methods to your 'base' application for working with the file… [more](https://github.com/node-base/base-fs) | [homepage](https://github.com/node-base/base-fs "base-methods plugin that adds vinyl-fs methods to your 'base' application for working with the file system, like src, dest, copy and symlink.")
* [base-generators](https://www.npmjs.com/package/base-generators): Adds project-generator support to your `base` application. | [homepage](https://github.com/node-base/base-generators "Adds project-generator support to your `base` application.")
* [base-option](https://www.npmjs.com/package/base-option): Adds a few options methods to base, like `option`, `enable` and `disable`. See the readme… [more](https://github.com/node-base/base-option) | [homepage](https://github.com/node-base/base-option "Adds a few options methods to base, like `option`, `enable` and `disable`. See the readme for the full API.")
* [base-pipeline](https://www.npmjs.com/package/base-pipeline): base-methods plugin that adds pipeline and plugin methods for dynamically composing streaming plugin pipelines. | [homepage](https://github.com/node-base/base-pipeline "base-methods plugin that adds pipeline and plugin methods for dynamically composing streaming plugin pipelines.")
* [base-pkg](https://www.npmjs.com/package/base-pkg): Plugin for adding a `pkg` method that exposes pkg-store to your base application. | [homepage](https://github.com/node-base/base-pkg "Plugin for adding a `pkg` method that exposes pkg-store to your base application.")
* [base-plugins](https://www.npmjs.com/package/base-plugins): Adds 'smart plugin' support to your base application. | [homepage](https://github.com/node-base/base-plugins "Adds 'smart plugin' support to your base application.")
* [base-questions](https://www.npmjs.com/package/base-questions): Plugin for base-methods that adds methods for prompting the user and storing the answers on… [more](https://github.com/node-base/base-questions) | [homepage](https://github.com/node-base/base-questions "Plugin for base-methods that adds methods for prompting the user and storing the answers on a project-by-project basis.")
* [base-store](https://www.npmjs.com/package/base-store): Plugin for getting and persisting config values with your base-methods application. Adds a 'store' object… [more](https://github.com/node-base/base-store) | [homepage](https://github.com/node-base/base-store "Plugin for getting and persisting config values with your base-methods application. Adds a 'store' object that exposes all of the methods from the data-store library. Also now supports sub-stores!")
* [base-task](https://www.npmjs.com/package/base-task): base plugin that provides a very thin wrapper around [https://github.com/doowb/composer](https://github.com/doowb/composer) for adding task methods to… [more](https://github.com/node-base/base-task) | [homepage](https://github.com/node-base/base-task "base plugin that provides a very thin wrapper around <https://github.com/doowb/composer> for adding task methods to your application.")
### Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
### Contributors
| **Commits** | **Contributor** |
| --- | --- |
| 141 | [jonschlinkert](https://github.com/jonschlinkert) |
| 30 | [doowb](https://github.com/doowb) |
| 3 | [charlike](https://github.com/charlike) |
| 1 | [criticalmash](https://github.com/criticalmash) |
| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |
### Building docs
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
To generate the readme, run the following command:
```sh
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```
### Running tests
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
```sh
$ npm install && npm test
```
### Author
**Jon Schlinkert**
* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
### License
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).
***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on September 07, 2017._

435
node_modules/base/index.js generated vendored Normal file
View File

@@ -0,0 +1,435 @@
'use strict';
var util = require('util');
var define = require('define-property');
var CacheBase = require('cache-base');
var Emitter = require('component-emitter');
var isObject = require('isobject');
var merge = require('mixin-deep');
var pascal = require('pascalcase');
var cu = require('class-utils');
/**
* Optionally define a custom `cache` namespace to use.
*/
function namespace(name) {
var Cache = name ? CacheBase.namespace(name) : CacheBase;
var fns = [];
/**
* Create an instance of `Base` with the given `config` and `options`.
*
* ```js
* // initialize with `config` and `options`
* var app = new Base({isApp: true}, {abc: true});
* app.set('foo', 'bar');
*
* // values defined with the given `config` object will be on the root of the instance
* console.log(app.baz); //=> undefined
* console.log(app.foo); //=> 'bar'
* // or use `.get`
* console.log(app.get('isApp')); //=> true
* console.log(app.get('foo')); //=> 'bar'
*
* // values defined with the given `options` object will be on `app.options
* console.log(app.options.abc); //=> true
* ```
*
* @param {Object} `config` If supplied, this object is passed to [cache-base][] to merge onto the the instance upon instantiation.
* @param {Object} `options` If supplied, this object is used to initialize the `base.options` object.
* @api public
*/
function Base(config, options) {
if (!(this instanceof Base)) {
return new Base(config, options);
}
Cache.call(this, config);
this.is('base');
this.initBase(config, options);
}
/**
* Inherit cache-base
*/
util.inherits(Base, Cache);
/**
* Add static emitter methods
*/
Emitter(Base);
/**
* Initialize `Base` defaults with the given `config` object
*/
Base.prototype.initBase = function(config, options) {
this.options = merge({}, this.options, options);
this.cache = this.cache || {};
this.define('registered', {});
if (name) this[name] = {};
// make `app._callbacks` non-enumerable
this.define('_callbacks', this._callbacks);
if (isObject(config)) {
this.visit('set', config);
}
Base.run(this, 'use', fns);
};
/**
* Set the given `name` on `app._name` and `app.is*` properties. Used for doing
* lookups in plugins.
*
* ```js
* app.is('foo');
* console.log(app._name);
* //=> 'foo'
* console.log(app.isFoo);
* //=> true
* app.is('bar');
* console.log(app.isFoo);
* //=> true
* console.log(app.isBar);
* //=> true
* console.log(app._name);
* //=> 'bar'
* ```
* @name .is
* @param {String} `name`
* @return {Boolean}
* @api public
*/
Base.prototype.is = function(name) {
if (typeof name !== 'string') {
throw new TypeError('expected name to be a string');
}
this.define('is' + pascal(name), true);
this.define('_name', name);
this.define('_appname', name);
return this;
};
/**
* Returns true if a plugin has already been registered on an instance.
*
* Plugin implementors are encouraged to use this first thing in a plugin
* to prevent the plugin from being called more than once on the same
* instance.
*
* ```js
* var base = new Base();
* base.use(function(app) {
* if (app.isRegistered('myPlugin')) return;
* // do stuff to `app`
* });
*
* // to also record the plugin as being registered
* base.use(function(app) {
* if (app.isRegistered('myPlugin', true)) return;
* // do stuff to `app`
* });
* ```
* @name .isRegistered
* @emits `plugin` Emits the name of the plugin being registered. Useful for unit tests, to ensure plugins are only registered once.
* @param {String} `name` The plugin name.
* @param {Boolean} `register` If the plugin if not already registered, to record it as being registered pass `true` as the second argument.
* @return {Boolean} Returns true if a plugin is already registered.
* @api public
*/
Base.prototype.isRegistered = function(name, register) {
if (this.registered.hasOwnProperty(name)) {
return true;
}
if (register !== false) {
this.registered[name] = true;
this.emit('plugin', name);
}
return false;
};
/**
* Define a plugin function to be called immediately upon init. Plugins are chainable
* and expose the following arguments to the plugin function:
*
* - `app`: the current instance of `Base`
* - `base`: the [first ancestor instance](#base) of `Base`
*
* ```js
* var app = new Base()
* .use(foo)
* .use(bar)
* .use(baz)
* ```
* @name .use
* @param {Function} `fn` plugin function to call
* @return {Object} Returns the item instance for chaining.
* @api public
*/
Base.prototype.use = function(fn) {
fn.call(this, this);
return this;
};
/**
* The `.define` method is used for adding non-enumerable property on the instance.
* Dot-notation is **not supported** with `define`.
*
* ```js
* // arbitrary `render` function using lodash `template`
* app.define('render', function(str, locals) {
* return _.template(str)(locals);
* });
* ```
* @name .define
* @param {String} `key` The name of the property to define.
* @param {any} `value`
* @return {Object} Returns the instance for chaining.
* @api public
*/
Base.prototype.define = function(key, val) {
if (isObject(key)) {
return this.visit('define', key);
}
define(this, key, val);
return this;
};
/**
* Mix property `key` onto the Base prototype. If base is inherited using
* `Base.extend` this method will be overridden by a new `mixin` method that will
* only add properties to the prototype of the inheriting application.
*
* ```js
* app.mixin('foo', function() {
* // do stuff
* });
* ```
* @name .mixin
* @param {String} `key`
* @param {Object|Array} `val`
* @return {Object} Returns the `base` instance for chaining.
* @api public
*/
Base.prototype.mixin = function(key, val) {
Base.prototype[key] = val;
return this;
};
/**
* Non-enumberable mixin array, used by the static [Base.mixin]() method.
*/
Base.prototype.mixins = Base.prototype.mixins || [];
/**
* Getter/setter used when creating nested instances of `Base`, for storing a reference
* to the first ancestor instance. This works by setting an instance of `Base` on the `parent`
* property of a "child" instance. The `base` property defaults to the current instance if
* no `parent` property is defined.
*
* ```js
* // create an instance of `Base`, this is our first ("base") instance
* var first = new Base();
* first.foo = 'bar'; // arbitrary property, to make it easier to see what's happening later
*
* // create another instance
* var second = new Base();
* // create a reference to the first instance (`first`)
* second.parent = first;
*
* // create another instance
* var third = new Base();
* // create a reference to the previous instance (`second`)
* // repeat this pattern every time a "child" instance is created
* third.parent = second;
*
* // we can always access the first instance using the `base` property
* console.log(first.base.foo);
* //=> 'bar'
* console.log(second.base.foo);
* //=> 'bar'
* console.log(third.base.foo);
* //=> 'bar'
* // and now you know how to get to third base ;)
* ```
* @name .base
* @api public
*/
Object.defineProperty(Base.prototype, 'base', {
configurable: true,
get: function() {
return this.parent ? this.parent.base : this;
}
});
/**
* Static method for adding global plugin functions that will
* be added to an instance when created.
*
* ```js
* Base.use(function(app) {
* app.foo = 'bar';
* });
* var app = new Base();
* console.log(app.foo);
* //=> 'bar'
* ```
* @name #use
* @param {Function} `fn` Plugin function to use on each instance.
* @return {Object} Returns the `Base` constructor for chaining
* @api public
*/
define(Base, 'use', function(fn) {
fns.push(fn);
return Base;
});
/**
* Run an array of functions by passing each function
* to a method on the given object specified by the given property.
*
* @param {Object} `obj` Object containing method to use.
* @param {String} `prop` Name of the method on the object to use.
* @param {Array} `arr` Array of functions to pass to the method.
*/
define(Base, 'run', function(obj, prop, arr) {
var len = arr.length, i = 0;
while (len--) {
obj[prop](arr[i++]);
}
return Base;
});
/**
* Static method for inheriting the prototype and static methods of the `Base` class.
* This method greatly simplifies the process of creating inheritance-based applications.
* See [static-extend][] for more details.
*
* ```js
* var extend = cu.extend(Parent);
* Parent.extend(Child);
*
* // optional methods
* Parent.extend(Child, {
* foo: function() {},
* bar: function() {}
* });
* ```
* @name #extend
* @param {Function} `Ctor` constructor to extend
* @param {Object} `methods` Optional prototype properties to mix in.
* @return {Object} Returns the `Base` constructor for chaining
* @api public
*/
define(Base, 'extend', cu.extend(Base, function(Ctor, Parent) {
Ctor.prototype.mixins = Ctor.prototype.mixins || [];
define(Ctor, 'mixin', function(fn) {
var mixin = fn(Ctor.prototype, Ctor);
if (typeof mixin === 'function') {
Ctor.prototype.mixins.push(mixin);
}
return Ctor;
});
define(Ctor, 'mixins', function(Child) {
Base.run(Child, 'mixin', Ctor.prototype.mixins);
return Ctor;
});
Ctor.prototype.mixin = function(key, value) {
Ctor.prototype[key] = value;
return this;
};
return Base;
}));
/**
* Used for adding methods to the `Base` prototype, and/or to the prototype of child instances.
* When a mixin function returns a function, the returned function is pushed onto the `.mixins`
* array, making it available to be used on inheriting classes whenever `Base.mixins()` is
* called (e.g. `Base.mixins(Child)`).
*
* ```js
* Base.mixin(function(proto) {
* proto.foo = function(msg) {
* return 'foo ' + msg;
* };
* });
* ```
* @name #mixin
* @param {Function} `fn` Function to call
* @return {Object} Returns the `Base` constructor for chaining
* @api public
*/
define(Base, 'mixin', function(fn) {
var mixin = fn(Base.prototype, Base);
if (typeof mixin === 'function') {
Base.prototype.mixins.push(mixin);
}
return Base;
});
/**
* Static method for running global mixin functions against a child constructor.
* Mixins must be registered before calling this method.
*
* ```js
* Base.extend(Child);
* Base.mixins(Child);
* ```
* @name #mixins
* @param {Function} `Child` Constructor function of a child class
* @return {Object} Returns the `Base` constructor for chaining
* @api public
*/
define(Base, 'mixins', function(Child) {
Base.run(Child, 'mixin', Base.prototype.mixins);
return Base;
});
/**
* Similar to `util.inherit`, but copies all static properties, prototype properties, and
* getters/setters from `Provider` to `Receiver`. See [class-utils][]{#inherit} for more details.
*
* ```js
* Base.inherit(Foo, Bar);
* ```
* @name #inherit
* @param {Function} `Receiver` Receiving (child) constructor
* @param {Function} `Provider` Providing (parent) constructor
* @return {Object} Returns the `Base` constructor for chaining
* @api public
*/
define(Base, 'inherit', cu.inherit);
define(Base, 'bubble', cu.bubble);
return Base;
}
/**
* Expose `Base` with default settings
*/
module.exports = namespace();
/**
* Allow users to define a namespace
*/
module.exports.namespace = namespace;

21
node_modules/base/node_modules/define-property/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015, 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
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.

View File

@@ -0,0 +1,95 @@
# define-property [![NPM version](https://img.shields.io/npm/v/define-property.svg?style=flat)](https://www.npmjs.com/package/define-property) [![NPM monthly downloads](https://img.shields.io/npm/dm/define-property.svg?style=flat)](https://npmjs.org/package/define-property) [![NPM total downloads](https://img.shields.io/npm/dt/define-property.svg?style=flat)](https://npmjs.org/package/define-property) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/define-property.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/define-property)
> Define a non-enumerable property on an object.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save define-property
```
Install with [yarn](https://yarnpkg.com):
```sh
$ yarn add define-property
```
## Usage
**Params**
* `obj`: The object on which to define the property.
* `prop`: The name of the property to be defined or modified.
* `descriptor`: The descriptor for the property being defined or modified.
```js
var define = require('define-property');
var obj = {};
define(obj, 'foo', function(val) {
return val.toUpperCase();
});
console.log(obj);
//=> {}
console.log(obj.foo('bar'));
//=> 'BAR'
```
**get/set**
```js
define(obj, 'foo', {
get: function() {},
set: function() {}
});
```
## About
### Related projects
* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.")
* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.")
* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep "Recursively merge values in a javascript object.")
* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep "Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone.")
### Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
### Building docs
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
To generate the readme, run the following command:
```sh
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```
### Running tests
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
```sh
$ npm install && npm test
```
### Author
**Jon Schlinkert**
* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
### License
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).
***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 20, 2017._

View File

@@ -0,0 +1,31 @@
/*!
* define-property <https://github.com/jonschlinkert/define-property>
*
* Copyright (c) 2015, 2017, Jon Schlinkert.
* Released under the MIT License.
*/
'use strict';
var isDescriptor = require('is-descriptor');
module.exports = function defineProperty(obj, prop, val) {
if (typeof obj !== 'object' && typeof obj !== 'function') {
throw new TypeError('expected an object or function.');
}
if (typeof prop !== 'string') {
throw new TypeError('expected `prop` to be a string.');
}
if (isDescriptor(val) && ('set' in val || 'get' in val)) {
return Object.defineProperty(obj, prop, val);
}
return Object.defineProperty(obj, prop, {
configurable: true,
enumerable: false,
writable: true,
value: val
});
};

View File

@@ -0,0 +1,120 @@
{
"_args": [
[
"define-property@^1.0.0",
"/home/bernhard/freifunk-app/node_modules/base"
]
],
"_from": "define-property@>=1.0.0 <2.0.0",
"_id": "define-property@1.0.0",
"_inCache": true,
"_installable": true,
"_location": "/base/define-property",
"_nodeVersion": "7.7.3",
"_npmOperationalInternal": {
"host": "packages-18-east.internal.npmjs.com",
"tmp": "tmp/define-property-1.0.0.tgz_1492669183321_0.5127195529639721"
},
"_npmUser": {
"email": "github@sellside.com",
"name": "jonschlinkert"
},
"_npmVersion": "4.2.0",
"_phantomChildren": {},
"_requested": {
"name": "define-property",
"raw": "define-property@^1.0.0",
"rawSpec": "^1.0.0",
"scope": null,
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/base"
],
"_resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
"_shasum": "769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6",
"_shrinkwrap": null,
"_spec": "define-property@^1.0.0",
"_where": "/home/bernhard/freifunk-app/node_modules/base",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"bugs": {
"url": "https://github.com/jonschlinkert/define-property/issues"
},
"dependencies": {
"is-descriptor": "^1.0.0"
},
"description": "Define a non-enumerable property on an object.",
"devDependencies": {
"gulp-format-md": "^0.1.12",
"mocha": "^3.2.0"
},
"directories": {},
"dist": {
"shasum": "769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6",
"tarball": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"gitHead": "4811e7c7999e82ab086265eefeb5d9cbffe10912",
"homepage": "https://github.com/jonschlinkert/define-property",
"keywords": [
"define",
"define-property",
"enumerable",
"key",
"non",
"non-enumerable",
"object",
"prop",
"property",
"value"
],
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"name": "jonschlinkert",
"email": "github@sellside.com"
}
],
"name": "define-property",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/jonschlinkert/define-property.git"
},
"scripts": {
"test": "mocha"
},
"verb": {
"layout": "default",
"lint": {
"reflinks": true
},
"plugins": [
"gulp-format-md"
],
"related": {
"list": [
"assign-deep",
"extend-shallow",
"merge-deep",
"mixin-deep"
]
},
"tasks": [
"readme"
],
"toc": false
},
"version": "1.0.0"
}

View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015-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
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.

View File

@@ -0,0 +1,144 @@
# is-accessor-descriptor [![NPM version](https://img.shields.io/npm/v/is-accessor-descriptor.svg?style=flat)](https://www.npmjs.com/package/is-accessor-descriptor) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-accessor-descriptor.svg?style=flat)](https://npmjs.org/package/is-accessor-descriptor) [![NPM total downloads](https://img.shields.io/npm/dt/is-accessor-descriptor.svg?style=flat)](https://npmjs.org/package/is-accessor-descriptor) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-accessor-descriptor.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-accessor-descriptor)
> Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save is-accessor-descriptor
```
## Usage
```js
var isAccessor = require('is-accessor-descriptor');
isAccessor({get: function() {}});
//=> true
```
You may also pass an object and property name to check if the property is an accessor:
```js
isAccessor(foo, 'bar');
```
## Examples
`false` when not an object
```js
isAccessor('a')
isAccessor(null)
isAccessor([])
//=> false
```
`true` when the object has valid properties
and the properties all have the correct JavaScript types:
```js
isAccessor({get: noop, set: noop})
isAccessor({get: noop})
isAccessor({set: noop})
//=> true
```
`false` when the object has invalid properties
```js
isAccessor({get: noop, set: noop, bar: 'baz'})
isAccessor({get: noop, writable: true})
isAccessor({get: noop, value: true})
//=> false
```
`false` when an accessor is not a function
```js
isAccessor({get: noop, set: 'baz'})
isAccessor({get: 'foo', set: noop})
isAccessor({get: 'foo', bar: 'baz'})
isAccessor({get: 'foo', set: 'baz'})
//=> false
```
`false` when a value is not the correct type
```js
isAccessor({get: noop, set: noop, enumerable: 'foo'})
isAccessor({set: noop, configurable: 'foo'})
isAccessor({get: noop, configurable: 'foo'})
//=> false
```
## About
<details>
<summary><strong>Contributing</strong></summary>
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
</details>
<details>
<summary><strong>Running Tests</strong></summary>
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
```sh
$ npm install && npm test
```
</details>
<details>
<summary><strong>Building docs</strong></summary>
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
To generate the readme, run the following command:
```sh
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```
</details>
### Related projects
You might also be interested in these projects:
* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.")
* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. | [homepage](https://github.com/jonschlinkert/is-data-descriptor "Returns true if a value has the characteristics of a valid JavaScript data descriptor.")
* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://github.com/jonschlinkert/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.")
* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.")
* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.")
### Contributors
| **Commits** | **Contributor** |
| --- | --- |
| 22 | [jonschlinkert](https://github.com/jonschlinkert) |
| 2 | [realityking](https://github.com/realityking) |
### Author
**Jon Schlinkert**
* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
### License
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).
***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 01, 2017._

View File

@@ -0,0 +1,69 @@
/*!
* is-accessor-descriptor <https://github.com/jonschlinkert/is-accessor-descriptor>
*
* Copyright (c) 2015-2017, Jon Schlinkert.
* Released under the MIT License.
*/
'use strict';
var typeOf = require('kind-of');
// accessor descriptor properties
var accessor = {
get: 'function',
set: 'function',
configurable: 'boolean',
enumerable: 'boolean'
};
function isAccessorDescriptor(obj, prop) {
if (typeof prop === 'string') {
var val = Object.getOwnPropertyDescriptor(obj, prop);
return typeof val !== 'undefined';
}
if (typeOf(obj) !== 'object') {
return false;
}
if (has(obj, 'value') || has(obj, 'writable')) {
return false;
}
if (!has(obj, 'get') || typeof obj.get !== 'function') {
return false;
}
// tldr: it's valid to have "set" be undefined
// "set" might be undefined if `Object.getOwnPropertyDescriptor`
// was used to get the value, and only `get` was defined by the user
if (has(obj, 'set') && typeof obj[key] !== 'function' && typeof obj[key] !== 'undefined') {
return false;
}
for (var key in obj) {
if (!accessor.hasOwnProperty(key)) {
continue;
}
if (typeOf(obj[key]) === accessor[key]) {
continue;
}
if (typeof obj[key] !== 'undefined') {
return false;
}
}
return true;
}
function has(obj, key) {
return {}.hasOwnProperty.call(obj, key);
}
/**
* Expose `isAccessorDescriptor`
*/
module.exports = isAccessorDescriptor;

View File

@@ -0,0 +1,138 @@
{
"_args": [
[
"is-accessor-descriptor@^1.0.0",
"/home/bernhard/freifunk-app/node_modules/base/node_modules/is-descriptor"
]
],
"_from": "is-accessor-descriptor@>=1.0.0 <2.0.0",
"_id": "is-accessor-descriptor@1.0.0",
"_inCache": true,
"_installable": true,
"_location": "/base/is-accessor-descriptor",
"_nodeVersion": "8.7.0",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/is-accessor-descriptor-1.0.0.tgz_1509516773874_0.014908343320712447"
},
"_npmUser": {
"email": "github@sellside.com",
"name": "jonschlinkert"
},
"_npmVersion": "5.5.1",
"_phantomChildren": {},
"_requested": {
"name": "is-accessor-descriptor",
"raw": "is-accessor-descriptor@^1.0.0",
"rawSpec": "^1.0.0",
"scope": null,
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/base/is-descriptor"
],
"_resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
"_shasum": "169c2f6d3df1f992618072365c9b0ea1f6878656",
"_shrinkwrap": null,
"_spec": "is-accessor-descriptor@^1.0.0",
"_where": "/home/bernhard/freifunk-app/node_modules/base/node_modules/is-descriptor",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"bugs": {
"url": "https://github.com/jonschlinkert/is-accessor-descriptor/issues"
},
"contributors": [
{
"name": "Jon Schlinkert",
"url": "http://twitter.com/jonschlinkert"
},
{
"name": "Rouven Weßling",
"url": "www.rouvenwessling.de"
}
],
"dependencies": {
"kind-of": "^6.0.0"
},
"description": "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.",
"devDependencies": {
"gulp-format-md": "^1.0.0",
"mocha": "^3.5.3"
},
"directories": {},
"dist": {
"integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
"shasum": "169c2f6d3df1f992618072365c9b0ea1f6878656",
"tarball": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"gitHead": "22b0a2617ccbebd131247c29e3700ca860d37d06",
"homepage": "https://github.com/jonschlinkert/is-accessor-descriptor",
"keywords": [
"accessor",
"check",
"data",
"descriptor",
"get",
"getter",
"is",
"keys",
"object",
"properties",
"property",
"set",
"setter",
"type",
"valid",
"value"
],
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"name": "jonschlinkert",
"email": "github@sellside.com"
}
],
"name": "is-accessor-descriptor",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/jonschlinkert/is-accessor-descriptor.git"
},
"scripts": {
"test": "mocha"
},
"verb": {
"layout": "default",
"lint": {
"reflinks": true
},
"plugins": [
"gulp-format-md"
],
"related": {
"list": [
"is-accessor-descriptor",
"is-data-descriptor",
"is-descriptor",
"is-plain-object",
"isobject"
]
},
"tasks": [
"readme"
],
"toc": false
},
"version": "1.0.0"
}

View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015-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
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.

View File

@@ -0,0 +1,161 @@
# is-data-descriptor [![NPM version](https://img.shields.io/npm/v/is-data-descriptor.svg?style=flat)](https://www.npmjs.com/package/is-data-descriptor) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-data-descriptor.svg?style=flat)](https://npmjs.org/package/is-data-descriptor) [![NPM total downloads](https://img.shields.io/npm/dt/is-data-descriptor.svg?style=flat)](https://npmjs.org/package/is-data-descriptor) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-data-descriptor.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-data-descriptor)
> Returns true if a value has the characteristics of a valid JavaScript data descriptor.
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save is-data-descriptor
```
## Usage
```js
var isDataDesc = require('is-data-descriptor');
```
## Examples
`true` when the descriptor has valid properties with valid values.
```js
// `value` can be anything
isDataDesc({value: 'foo'})
isDataDesc({value: function() {}})
isDataDesc({value: true})
//=> true
```
`false` when not an object
```js
isDataDesc('a')
//=> false
isDataDesc(null)
//=> false
isDataDesc([])
//=> false
```
`false` when the object has invalid properties
```js
isDataDesc({value: 'foo', bar: 'baz'})
//=> false
isDataDesc({value: 'foo', bar: 'baz'})
//=> false
isDataDesc({value: 'foo', get: function(){}})
//=> false
isDataDesc({get: function(){}, value: 'foo'})
//=> false
```
`false` when a value is not the correct type
```js
isDataDesc({value: 'foo', enumerable: 'foo'})
//=> false
isDataDesc({value: 'foo', configurable: 'foo'})
//=> false
isDataDesc({value: 'foo', writable: 'foo'})
//=> false
```
## Valid properties
The only valid data descriptor properties are the following:
* `configurable` (required)
* `enumerable` (required)
* `value` (optional)
* `writable` (optional)
To be a valid data descriptor, either `value` or `writable` must be defined.
**Invalid properties**
A descriptor may have additional _invalid_ properties (an error will **not** be thrown).
```js
var foo = {};
Object.defineProperty(foo, 'bar', {
enumerable: true,
whatever: 'blah', // invalid, but doesn't cause an error
get: function() {
return 'baz';
}
});
console.log(foo.bar);
//=> 'baz'
```
## About
<details>
<summary><strong>Contributing</strong></summary>
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
</details>
<details>
<summary><strong>Running Tests</strong></summary>
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
```sh
$ npm install && npm test
```
</details>
<details>
<summary><strong>Building docs</strong></summary>
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
To generate the readme, run the following command:
```sh
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```
</details>
### Related projects
You might also be interested in these projects:
* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.")
* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. | [homepage](https://github.com/jonschlinkert/is-data-descriptor "Returns true if a value has the characteristics of a valid JavaScript data descriptor.")
* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://github.com/jonschlinkert/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.")
* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.")
### Contributors
| **Commits** | **Contributor** |
| --- | --- |
| 21 | [jonschlinkert](https://github.com/jonschlinkert) |
| 2 | [realityking](https://github.com/realityking) |
### Author
**Jon Schlinkert**
* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
### License
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).
***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 01, 2017._

View File

@@ -0,0 +1,49 @@
/*!
* is-data-descriptor <https://github.com/jonschlinkert/is-data-descriptor>
*
* Copyright (c) 2015-2017, Jon Schlinkert.
* Released under the MIT License.
*/
'use strict';
var typeOf = require('kind-of');
module.exports = function isDataDescriptor(obj, prop) {
// data descriptor properties
var data = {
configurable: 'boolean',
enumerable: 'boolean',
writable: 'boolean'
};
if (typeOf(obj) !== 'object') {
return false;
}
if (typeof prop === 'string') {
var val = Object.getOwnPropertyDescriptor(obj, prop);
return typeof val !== 'undefined';
}
if (!('value' in obj) && !('writable' in obj)) {
return false;
}
for (var key in obj) {
if (key === 'value') continue;
if (!data.hasOwnProperty(key)) {
continue;
}
if (typeOf(obj[key]) === data[key]) {
continue;
}
if (typeof obj[key] !== 'undefined') {
return false;
}
}
return true;
};

View File

@@ -0,0 +1,137 @@
{
"_args": [
[
"is-data-descriptor@^1.0.0",
"/home/bernhard/freifunk-app/node_modules/base/node_modules/is-descriptor"
]
],
"_from": "is-data-descriptor@>=1.0.0 <2.0.0",
"_id": "is-data-descriptor@1.0.0",
"_inCache": true,
"_installable": true,
"_location": "/base/is-data-descriptor",
"_nodeVersion": "8.7.0",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/is-data-descriptor-1.0.0.tgz_1509518030206_0.015712385065853596"
},
"_npmUser": {
"email": "github@sellside.com",
"name": "jonschlinkert"
},
"_npmVersion": "5.5.1",
"_phantomChildren": {},
"_requested": {
"name": "is-data-descriptor",
"raw": "is-data-descriptor@^1.0.0",
"rawSpec": "^1.0.0",
"scope": null,
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/base/is-descriptor"
],
"_resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
"_shasum": "d84876321d0e7add03990406abbbbd36ba9268c7",
"_shrinkwrap": null,
"_spec": "is-data-descriptor@^1.0.0",
"_where": "/home/bernhard/freifunk-app/node_modules/base/node_modules/is-descriptor",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"bugs": {
"url": "https://github.com/jonschlinkert/is-data-descriptor/issues"
},
"contributors": [
{
"name": "Jon Schlinkert",
"url": "http://twitter.com/jonschlinkert"
},
{
"name": "Rouven Weßling",
"url": "www.rouvenwessling.de"
}
],
"dependencies": {
"kind-of": "^6.0.0"
},
"description": "Returns true if a value has the characteristics of a valid JavaScript data descriptor.",
"devDependencies": {
"gulp-format-md": "^1.0.0",
"mocha": "^3.5.3"
},
"directories": {},
"dist": {
"integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
"shasum": "d84876321d0e7add03990406abbbbd36ba9268c7",
"tarball": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"gitHead": "42dcba2627fe655daa21aec843ca8de849f26cd6",
"homepage": "https://github.com/jonschlinkert/is-data-descriptor",
"keywords": [
"accessor",
"check",
"data",
"descriptor",
"get",
"getter",
"is",
"keys",
"object",
"properties",
"property",
"set",
"setter",
"type",
"valid",
"value"
],
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"name": "jonschlinkert",
"email": "github@sellside.com"
}
],
"name": "is-data-descriptor",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/jonschlinkert/is-data-descriptor.git"
},
"scripts": {
"test": "mocha"
},
"verb": {
"layout": "default",
"lint": {
"reflinks": true
},
"plugins": [
"gulp-format-md"
],
"related": {
"list": [
"is-accessor-descriptor",
"is-data-descriptor",
"is-descriptor",
"isobject"
]
},
"tasks": [
"readme"
],
"toc": false
},
"version": "1.0.0"
}

21
node_modules/base/node_modules/is-descriptor/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015-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
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.

193
node_modules/base/node_modules/is-descriptor/README.md generated vendored Normal file
View File

@@ -0,0 +1,193 @@
# is-descriptor [![NPM version](https://img.shields.io/npm/v/is-descriptor.svg?style=flat)](https://www.npmjs.com/package/is-descriptor) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-descriptor.svg?style=flat)](https://npmjs.org/package/is-descriptor) [![NPM total downloads](https://img.shields.io/npm/dt/is-descriptor.svg?style=flat)](https://npmjs.org/package/is-descriptor) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-descriptor.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-descriptor)
> Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save is-descriptor
```
## Usage
```js
var isDescriptor = require('is-descriptor');
isDescriptor({value: 'foo'})
//=> true
isDescriptor({get: function(){}, set: function(){}})
//=> true
isDescriptor({get: 'foo', set: function(){}})
//=> false
```
You may also check for a descriptor by passing an object as the first argument and property name (`string`) as the second argument.
```js
var obj = {};
obj.foo = 'abc';
Object.defineProperty(obj, 'bar', {
value: 'xyz'
});
isDescriptor(obj, 'foo');
//=> true
isDescriptor(obj, 'bar');
//=> true
```
## Examples
### value type
`false` when not an object
```js
isDescriptor('a');
//=> false
isDescriptor(null);
//=> false
isDescriptor([]);
//=> false
```
### data descriptor
`true` when the object has valid properties with valid values.
```js
isDescriptor({value: 'foo'});
//=> true
isDescriptor({value: noop});
//=> true
```
`false` when the object has invalid properties
```js
isDescriptor({value: 'foo', bar: 'baz'});
//=> false
isDescriptor({value: 'foo', bar: 'baz'});
//=> false
isDescriptor({value: 'foo', get: noop});
//=> false
isDescriptor({get: noop, value: noop});
//=> false
```
`false` when a value is not the correct type
```js
isDescriptor({value: 'foo', enumerable: 'foo'});
//=> false
isDescriptor({value: 'foo', configurable: 'foo'});
//=> false
isDescriptor({value: 'foo', writable: 'foo'});
//=> false
```
### accessor descriptor
`true` when the object has valid properties with valid values.
```js
isDescriptor({get: noop, set: noop});
//=> true
isDescriptor({get: noop});
//=> true
isDescriptor({set: noop});
//=> true
```
`false` when the object has invalid properties
```js
isDescriptor({get: noop, set: noop, bar: 'baz'});
//=> false
isDescriptor({get: noop, writable: true});
//=> false
isDescriptor({get: noop, value: true});
//=> false
```
`false` when an accessor is not a function
```js
isDescriptor({get: noop, set: 'baz'});
//=> false
isDescriptor({get: 'foo', set: noop});
//=> false
isDescriptor({get: 'foo', bar: 'baz'});
//=> false
isDescriptor({get: 'foo', set: 'baz'});
//=> false
```
`false` when a value is not the correct type
```js
isDescriptor({get: noop, set: noop, enumerable: 'foo'});
//=> false
isDescriptor({set: noop, configurable: 'foo'});
//=> false
isDescriptor({get: noop, configurable: 'foo'});
//=> false
```
## About
### Related projects
* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.")
* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. | [homepage](https://github.com/jonschlinkert/is-data-descriptor "Returns true if a value has the characteristics of a valid JavaScript data descriptor.")
* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://github.com/jonschlinkert/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.")
* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.")
### Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
### Contributors
| **Commits** | **Contributor** |
| --- | --- |
| 24 | [jonschlinkert](https://github.com/jonschlinkert) |
| 1 | [doowb](https://github.com/doowb) |
| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |
### Building docs
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
To generate the readme, run the following command:
```sh
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```
### Running tests
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
```sh
$ npm install && npm test
```
### Author
**Jon Schlinkert**
* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
### License
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).
***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 22, 2017._

22
node_modules/base/node_modules/is-descriptor/index.js generated vendored Normal file
View File

@@ -0,0 +1,22 @@
/*!
* is-descriptor <https://github.com/jonschlinkert/is-descriptor>
*
* Copyright (c) 2015-2017, Jon Schlinkert.
* Released under the MIT License.
*/
'use strict';
var typeOf = require('kind-of');
var isAccessor = require('is-accessor-descriptor');
var isData = require('is-data-descriptor');
module.exports = function isDescriptor(obj, key) {
if (typeOf(obj) !== 'object') {
return false;
}
if ('get' in obj) {
return isAccessor(obj, key);
}
return isData(obj, key);
};

View File

@@ -0,0 +1,142 @@
{
"_args": [
[
"is-descriptor@^1.0.0",
"/home/bernhard/freifunk-app/node_modules/base/node_modules/define-property"
]
],
"_from": "is-descriptor@>=1.0.0 <2.0.0",
"_id": "is-descriptor@1.0.2",
"_inCache": true,
"_installable": true,
"_location": "/base/is-descriptor",
"_nodeVersion": "9.1.0",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/is-descriptor-1.0.2.tgz_1514502694043_0.9101065774448216"
},
"_npmUser": {
"email": "github@sellside.com",
"name": "jonschlinkert"
},
"_npmVersion": "5.6.0",
"_phantomChildren": {},
"_requested": {
"name": "is-descriptor",
"raw": "is-descriptor@^1.0.0",
"rawSpec": "^1.0.0",
"scope": null,
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/base/define-property"
],
"_resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
"_shasum": "3b159746a66604b04f8c81524ba365c5f14d86ec",
"_shrinkwrap": null,
"_spec": "is-descriptor@^1.0.0",
"_where": "/home/bernhard/freifunk-app/node_modules/base/node_modules/define-property",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"bugs": {
"url": "https://github.com/jonschlinkert/is-descriptor/issues"
},
"contributors": [
{
"name": "Brian Woodward",
"url": "https://twitter.com/doowb"
},
{
"name": "Jon Schlinkert",
"url": "http://twitter.com/jonschlinkert"
},
{
"url": "https://github.com/wtgtybhertgeghgtwtg"
}
],
"dependencies": {
"is-accessor-descriptor": "^1.0.0",
"is-data-descriptor": "^1.0.0",
"kind-of": "^6.0.2"
},
"description": "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.",
"devDependencies": {
"gulp-format-md": "^1.0.0",
"mocha": "^3.5.3"
},
"directories": {},
"dist": {
"integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
"shasum": "3b159746a66604b04f8c81524ba365c5f14d86ec",
"tarball": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"gitHead": "324635c990dc7f1e6d169deecd19769dea72114c",
"homepage": "https://github.com/jonschlinkert/is-descriptor",
"keywords": [
"accessor",
"check",
"data",
"descriptor",
"get",
"getter",
"is",
"keys",
"object",
"properties",
"property",
"set",
"setter",
"type",
"valid",
"value"
],
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"name": "jonschlinkert",
"email": "github@sellside.com"
}
],
"name": "is-descriptor",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/jonschlinkert/is-descriptor.git"
},
"scripts": {
"test": "mocha"
},
"verb": {
"layout": "default",
"lint": {
"reflinks": true
},
"plugins": [
"gulp-format-md"
],
"related": {
"list": [
"is-accessor-descriptor",
"is-data-descriptor",
"is-descriptor",
"isobject"
]
},
"tasks": [
"readme"
],
"toc": false
},
"version": "1.0.2"
}

21
node_modules/base/node_modules/isobject/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
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
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.

122
node_modules/base/node_modules/isobject/README.md generated vendored Normal file
View File

@@ -0,0 +1,122 @@
# isobject [![NPM version](https://img.shields.io/npm/v/isobject.svg?style=flat)](https://www.npmjs.com/package/isobject) [![NPM monthly downloads](https://img.shields.io/npm/dm/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![NPM total downloads](https://img.shields.io/npm/dt/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/isobject.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/isobject)
> Returns true if the value is an object and not an array or null.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save isobject
```
Install with [yarn](https://yarnpkg.com):
```sh
$ yarn add isobject
```
Use [is-plain-object](https://github.com/jonschlinkert/is-plain-object) if you want only objects that are created by the `Object` constructor.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install isobject
```
Install with [bower](https://bower.io/)
```sh
$ bower install isobject
```
## Usage
```js
var isObject = require('isobject');
```
**True**
All of the following return `true`:
```js
isObject({});
isObject(Object.create({}));
isObject(Object.create(Object.prototype));
isObject(Object.create(null));
isObject({});
isObject(new Foo);
isObject(/foo/);
```
**False**
All of the following return `false`:
```js
isObject();
isObject(function () {});
isObject(1);
isObject([]);
isObject(undefined);
isObject(null);
```
## About
### Related projects
* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.")
* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.")
* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.")
* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep "Recursively merge values in a javascript object.")
### Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
### Contributors
| **Commits** | **Contributor** |
| --- | --- |
| 29 | [jonschlinkert](https://github.com/jonschlinkert) |
| 4 | [doowb](https://github.com/doowb) |
| 1 | [magnudae](https://github.com/magnudae) |
| 1 | [LeSuisse](https://github.com/LeSuisse) |
| 1 | [tmcw](https://github.com/tmcw) |
### Building docs
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
To generate the readme, run the following command:
```sh
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```
### Running tests
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
```sh
$ npm install && npm test
```
### Author
**Jon Schlinkert**
* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
### License
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).
***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 30, 2017._

5
node_modules/base/node_modules/isobject/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
export = isObject;
declare function isObject(val: any): boolean;
declare namespace isObject {}

12
node_modules/base/node_modules/isobject/index.js generated vendored Normal file
View File

@@ -0,0 +1,12 @@
/*!
* isobject <https://github.com/jonschlinkert/isobject>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
'use strict';
module.exports = function isObject(val) {
return val != null && typeof val === 'object' && Array.isArray(val) === false;
};

150
node_modules/base/node_modules/isobject/package.json generated vendored Normal file
View File

@@ -0,0 +1,150 @@
{
"_args": [
[
"isobject@^3.0.1",
"/home/bernhard/freifunk-app/node_modules/base"
]
],
"_from": "isobject@>=3.0.1 <4.0.0",
"_id": "isobject@3.0.1",
"_inCache": true,
"_installable": true,
"_location": "/base/isobject",
"_nodeVersion": "6.10.1",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/isobject-3.0.1.tgz_1498846769653_0.28330610087141395"
},
"_npmUser": {
"email": "brian.woodward@gmail.com",
"name": "doowb"
},
"_npmVersion": "4.6.1",
"_phantomChildren": {},
"_requested": {
"name": "isobject",
"raw": "isobject@^3.0.1",
"rawSpec": "^3.0.1",
"scope": null,
"spec": ">=3.0.1 <4.0.0",
"type": "range"
},
"_requiredBy": [
"/base"
],
"_resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
"_shasum": "4e431e92b11a9731636aa1f9c8d1ccbcfdab78df",
"_shrinkwrap": null,
"_spec": "isobject@^3.0.1",
"_where": "/home/bernhard/freifunk-app/node_modules/base",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"bugs": {
"url": "https://github.com/jonschlinkert/isobject/issues"
},
"contributors": [
{
"url": "https://github.com/LeSuisse"
},
{
"name": "Brian Woodward",
"url": "https://twitter.com/doowb"
},
{
"name": "Jon Schlinkert",
"url": "http://twitter.com/jonschlinkert"
},
{
"name": "Magnús Dæhlen",
"url": "https://github.com/magnudae"
},
{
"name": "Tom MacWright",
"url": "https://macwright.org"
}
],
"dependencies": {},
"description": "Returns true if the value is an object and not an array or null.",
"devDependencies": {
"gulp-format-md": "^0.1.9",
"mocha": "^2.4.5"
},
"directories": {},
"dist": {
"shasum": "4e431e92b11a9731636aa1f9c8d1ccbcfdab78df",
"tarball": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.d.ts",
"index.js"
],
"gitHead": "7ad1fc405d19f144a21e2bfe947fa82801baa7aa",
"homepage": "https://github.com/jonschlinkert/isobject",
"keywords": [
"check",
"is",
"is-object",
"isobject",
"kind",
"kind-of",
"kindof",
"native",
"object",
"type",
"typeof",
"value"
],
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"name": "jonschlinkert",
"email": "github@sellside.com"
},
{
"name": "doowb",
"email": "brian.woodward@gmail.com"
}
],
"name": "isobject",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/jonschlinkert/isobject.git"
},
"scripts": {
"test": "mocha"
},
"types": "index.d.ts",
"verb": {
"layout": "default",
"lint": {
"reflinks": true
},
"plugins": [
"gulp-format-md"
],
"reflinks": [
"verb"
],
"related": {
"list": [
"extend-shallow",
"is-plain-object",
"kind-of",
"merge-deep"
]
},
"tasks": [
"readme"
],
"toc": false
},
"version": "3.0.1"
}

157
node_modules/base/node_modules/kind-of/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,157 @@
# Release history
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
<details>
<summary><strong>Guiding Principles</strong></summary>
- Changelogs are for humans, not machines.
- There should be an entry for every single version.
- The same types of changes should be grouped.
- Versions and sections should be linkable.
- The latest version comes first.
- The release date of each versions is displayed.
- Mention whether you follow Semantic Versioning.
</details>
<details>
<summary><strong>Types of changes</strong></summary>
Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_):
- `Added` for new features.
- `Changed` for changes in existing functionality.
- `Deprecated` for soon-to-be removed features.
- `Removed` for now removed features.
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.
</details>
## [6.0.0] - 2017-10-13
- refactor code to be more performant
- refactor benchmarks
## [5.1.0] - 2017-10-13
**Added**
- Merge pull request #15 from aretecode/patch-1
- adds support and tests for string & array iterators
**Changed**
- updates benchmarks
## [5.0.2] - 2017-08-02
- Merge pull request #14 from struct78/master
- Added `undefined` check
## [5.0.0] - 2017-06-21
- Merge pull request #12 from aretecode/iterator
- Set Iterator + Map Iterator
- streamline `isbuffer`, minor edits
## [4.0.0] - 2017-05-19
- Merge pull request #8 from tunnckoCore/master
- update deps
## [3.2.2] - 2017-05-16
- fix version
## [3.2.1] - 2017-05-16
- add browserify
## [3.2.0] - 2017-04-25
- Merge pull request #10 from ksheedlo/unrequire-buffer
- add `promise` support and tests
- Remove unnecessary `Buffer` check
## [3.1.0] - 2016-12-07
- Merge pull request #7 from laggingreflex/err
- add support for `error` and tests
- run update
## [3.0.4] - 2016-07-29
- move tests
- run update
## [3.0.3] - 2016-05-03
- fix prepublish script
- remove unused dep
## [3.0.0] - 2015-11-17
- add typed array support
- Merge pull request #5 from miguelmota/typed-arrays
- adds new tests
## [2.0.1] - 2015-08-21
- use `is-buffer` module
## [2.0.0] - 2015-05-31
- Create fallback for `Array.isArray` if used as a browser package
- Merge pull request #2 from dtothefp/patch-1
- Merge pull request #3 from pdehaan/patch-1
- Merge branch 'master' of https://github.com/chorks/kind-of into chorks-master
- optimizations, mostly date and regex
## [1.1.0] - 2015-02-09
- adds `buffer` support
- adds tests for `buffer`
## [1.0.0] - 2015-01-19
- update benchmarks
- optimizations based on benchmarks
## [0.1.2] - 2014-10-26
- return `typeof` value if it's not an object. very slight speed improvement
- use `.slice`
- adds benchmarks
## [0.1.0] - 2014-9-26
- first commit
[6.0.0]: https://github.com/jonschlinkert/kind-of/compare/5.1.0...6.0.0
[5.1.0]: https://github.com/jonschlinkert/kind-of/compare/5.0.2...5.1.0
[5.0.2]: https://github.com/jonschlinkert/kind-of/compare/5.0.1...5.0.2
[5.0.1]: https://github.com/jonschlinkert/kind-of/compare/5.0.0...5.0.1
[5.0.0]: https://github.com/jonschlinkert/kind-of/compare/4.0.0...5.0.0
[4.0.0]: https://github.com/jonschlinkert/kind-of/compare/3.2.2...4.0.0
[3.2.2]: https://github.com/jonschlinkert/kind-of/compare/3.2.1...3.2.2
[3.2.1]: https://github.com/jonschlinkert/kind-of/compare/3.2.0...3.2.1
[3.2.0]: https://github.com/jonschlinkert/kind-of/compare/3.1.0...3.2.0
[3.1.0]: https://github.com/jonschlinkert/kind-of/compare/3.0.4...3.1.0
[3.0.4]: https://github.com/jonschlinkert/kind-of/compare/3.0.3...3.0.4
[3.0.3]: https://github.com/jonschlinkert/kind-of/compare/3.0.0...3.0.3
[3.0.0]: https://github.com/jonschlinkert/kind-of/compare/2.0.1...3.0.0
[2.0.1]: https://github.com/jonschlinkert/kind-of/compare/2.0.0...2.0.1
[2.0.0]: https://github.com/jonschlinkert/kind-of/compare/1.1.0...2.0.0
[1.1.0]: https://github.com/jonschlinkert/kind-of/compare/1.0.0...1.1.0
[1.0.0]: https://github.com/jonschlinkert/kind-of/compare/0.1.2...1.0.0
[0.1.2]: https://github.com/jonschlinkert/kind-of/compare/0.1.0...0.1.2
[0.1.0]: https://github.com/jonschlinkert/kind-of/commit/2fae09b0b19b1aadb558e9be39f0c3ef6034eb87
[Unreleased]: https://github.com/jonschlinkert/kind-of/compare/0.1.2...HEAD
[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog

21
node_modules/base/node_modules/kind-of/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
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
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.

365
node_modules/base/node_modules/kind-of/README.md generated vendored Normal file
View File

@@ -0,0 +1,365 @@
# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of)
> Get the native type of a value.
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save kind-of
```
Install with [bower](https://bower.io/)
```sh
$ bower install kind-of --save
```
## Why use this?
1. [it's fast](#benchmarks) | [optimizations](#optimizations)
2. [better type checking](#better-type-checking)
## Usage
> es5, es6, and browser ready
```js
var kindOf = require('kind-of');
kindOf(undefined);
//=> 'undefined'
kindOf(null);
//=> 'null'
kindOf(true);
//=> 'boolean'
kindOf(false);
//=> 'boolean'
kindOf(new Buffer(''));
//=> 'buffer'
kindOf(42);
//=> 'number'
kindOf('str');
//=> 'string'
kindOf(arguments);
//=> 'arguments'
kindOf({});
//=> 'object'
kindOf(Object.create(null));
//=> 'object'
kindOf(new Test());
//=> 'object'
kindOf(new Date());
//=> 'date'
kindOf([1, 2, 3]);
//=> 'array'
kindOf(/foo/);
//=> 'regexp'
kindOf(new RegExp('foo'));
//=> 'regexp'
kindOf(new Error('error'));
//=> 'error'
kindOf(function () {});
//=> 'function'
kindOf(function * () {});
//=> 'generatorfunction'
kindOf(Symbol('str'));
//=> 'symbol'
kindOf(new Map());
//=> 'map'
kindOf(new WeakMap());
//=> 'weakmap'
kindOf(new Set());
//=> 'set'
kindOf(new WeakSet());
//=> 'weakset'
kindOf(new Int8Array());
//=> 'int8array'
kindOf(new Uint8Array());
//=> 'uint8array'
kindOf(new Uint8ClampedArray());
//=> 'uint8clampedarray'
kindOf(new Int16Array());
//=> 'int16array'
kindOf(new Uint16Array());
//=> 'uint16array'
kindOf(new Int32Array());
//=> 'int32array'
kindOf(new Uint32Array());
//=> 'uint32array'
kindOf(new Float32Array());
//=> 'float32array'
kindOf(new Float64Array());
//=> 'float64array'
```
## Benchmarks
Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of).
```bash
# arguments (32 bytes)
kind-of x 17,024,098 ops/sec ±1.90% (86 runs sampled)
lib-type-of x 11,926,235 ops/sec ±1.34% (83 runs sampled)
lib-typeof x 9,245,257 ops/sec ±1.22% (87 runs sampled)
fastest is kind-of (by 161% avg)
# array (22 bytes)
kind-of x 17,196,492 ops/sec ±1.07% (88 runs sampled)
lib-type-of x 8,838,283 ops/sec ±1.02% (87 runs sampled)
lib-typeof x 8,677,848 ops/sec ±0.87% (87 runs sampled)
fastest is kind-of (by 196% avg)
# boolean (24 bytes)
kind-of x 16,841,600 ops/sec ±1.10% (86 runs sampled)
lib-type-of x 8,096,787 ops/sec ±0.95% (87 runs sampled)
lib-typeof x 8,423,345 ops/sec ±1.15% (86 runs sampled)
fastest is kind-of (by 204% avg)
# buffer (38 bytes)
kind-of x 14,848,060 ops/sec ±1.05% (86 runs sampled)
lib-type-of x 3,671,577 ops/sec ±1.49% (87 runs sampled)
lib-typeof x 8,360,236 ops/sec ±1.24% (86 runs sampled)
fastest is kind-of (by 247% avg)
# date (30 bytes)
kind-of x 16,067,761 ops/sec ±1.58% (86 runs sampled)
lib-type-of x 8,954,436 ops/sec ±1.40% (87 runs sampled)
lib-typeof x 8,488,307 ops/sec ±1.51% (84 runs sampled)
fastest is kind-of (by 184% avg)
# error (36 bytes)
kind-of x 9,634,090 ops/sec ±1.12% (89 runs sampled)
lib-type-of x 7,735,624 ops/sec ±1.32% (86 runs sampled)
lib-typeof x 7,442,160 ops/sec ±1.11% (90 runs sampled)
fastest is kind-of (by 127% avg)
# function (34 bytes)
kind-of x 10,031,494 ops/sec ±1.27% (86 runs sampled)
lib-type-of x 9,502,757 ops/sec ±1.17% (89 runs sampled)
lib-typeof x 8,278,985 ops/sec ±1.08% (88 runs sampled)
fastest is kind-of (by 113% avg)
# null (24 bytes)
kind-of x 18,159,808 ops/sec ±1.92% (86 runs sampled)
lib-type-of x 12,927,635 ops/sec ±1.01% (88 runs sampled)
lib-typeof x 7,958,234 ops/sec ±1.21% (89 runs sampled)
fastest is kind-of (by 174% avg)
# number (22 bytes)
kind-of x 17,846,779 ops/sec ±0.91% (85 runs sampled)
lib-type-of x 3,316,636 ops/sec ±1.19% (86 runs sampled)
lib-typeof x 2,329,477 ops/sec ±2.21% (85 runs sampled)
fastest is kind-of (by 632% avg)
# object-plain (47 bytes)
kind-of x 7,085,155 ops/sec ±1.05% (88 runs sampled)
lib-type-of x 8,870,930 ops/sec ±1.06% (83 runs sampled)
lib-typeof x 8,716,024 ops/sec ±1.05% (87 runs sampled)
fastest is lib-type-of (by 112% avg)
# regex (25 bytes)
kind-of x 14,196,052 ops/sec ±1.65% (84 runs sampled)
lib-type-of x 9,554,164 ops/sec ±1.25% (88 runs sampled)
lib-typeof x 8,359,691 ops/sec ±1.07% (87 runs sampled)
fastest is kind-of (by 158% avg)
# string (33 bytes)
kind-of x 16,131,428 ops/sec ±1.41% (85 runs sampled)
lib-type-of x 7,273,172 ops/sec ±1.05% (87 runs sampled)
lib-typeof x 7,382,635 ops/sec ±1.17% (85 runs sampled)
fastest is kind-of (by 220% avg)
# symbol (34 bytes)
kind-of x 17,011,537 ops/sec ±1.24% (86 runs sampled)
lib-type-of x 3,492,454 ops/sec ±1.23% (89 runs sampled)
lib-typeof x 7,471,235 ops/sec ±2.48% (87 runs sampled)
fastest is kind-of (by 310% avg)
# template-strings (36 bytes)
kind-of x 15,434,250 ops/sec ±1.46% (83 runs sampled)
lib-type-of x 7,157,907 ops/sec ±0.97% (87 runs sampled)
lib-typeof x 7,517,986 ops/sec ±0.92% (86 runs sampled)
fastest is kind-of (by 210% avg)
# undefined (29 bytes)
kind-of x 19,167,115 ops/sec ±1.71% (87 runs sampled)
lib-type-of x 15,477,740 ops/sec ±1.63% (85 runs sampled)
lib-typeof x 19,075,495 ops/sec ±1.17% (83 runs sampled)
fastest is lib-typeof,kind-of
```
## Optimizations
In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library:
1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot.
2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it.
3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'`
4. There is no reason to make the code in a microlib as terse as possible, just to win points for making it shorter. It's always better to favor performant code over terse code. You will always only be using a single `require()` statement to use the library anyway, regardless of how the code is written.
## Better type checking
kind-of seems to be more consistently "correct" than other type checking libs I've looked at. For example, here are some differing results from other popular libs:
### [typeof](https://github.com/CodingFu/typeof) lib
Incorrectly identifies instances of custom constructors (pretty common):
```js
var typeOf = require('typeof');
function Test() {}
console.log(typeOf(new Test()));
//=> 'test'
```
Returns `object` instead of `arguments`:
```js
function foo() {
console.log(typeOf(arguments)) //=> 'object'
}
foo();
```
### [type-of](https://github.com/ForbesLindesay/type-of) lib
Incorrectly returns `object` for generator functions, buffers, `Map`, `Set`, `WeakMap` and `WeakSet`:
```js
function * foo() {}
console.log(typeOf(foo));
//=> 'object'
console.log(typeOf(new Buffer('')));
//=> 'object'
console.log(typeOf(new Map()));
//=> 'object'
console.log(typeOf(new Set()));
//=> 'object'
console.log(typeOf(new WeakMap()));
//=> 'object'
console.log(typeOf(new WeakSet()));
//=> 'object'
```
## About
<details>
<summary><strong>Contributing</strong></summary>
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
</details>
<details>
<summary><strong>Running Tests</strong></summary>
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
```sh
$ npm install && npm test
```
</details>
<details>
<summary><strong>Building docs</strong></summary>
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
To generate the readme, run the following command:
```sh
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```
</details>
### Related projects
You might also be interested in these projects:
* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet")
* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.")
* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ")
### Contributors
| **Commits** | **Contributor** |
| --- | --- |
| 98 | [jonschlinkert](https://github.com/jonschlinkert) |
| 3 | [aretecode](https://github.com/aretecode) |
| 2 | [miguelmota](https://github.com/miguelmota) |
| 1 | [dtothefp](https://github.com/dtothefp) |
| 1 | [ianstormtaylor](https://github.com/ianstormtaylor) |
| 1 | [ksheedlo](https://github.com/ksheedlo) |
| 1 | [pdehaan](https://github.com/pdehaan) |
| 1 | [laggingreflex](https://github.com/laggingreflex) |
| 1 | [charlike-old](https://github.com/charlike-old) |
### Author
**Jon Schlinkert**
* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert)
* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
### License
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).
***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on December 01, 2017._

129
node_modules/base/node_modules/kind-of/index.js generated vendored Normal file
View File

@@ -0,0 +1,129 @@
var toString = Object.prototype.toString;
module.exports = function kindOf(val) {
if (val === void 0) return 'undefined';
if (val === null) return 'null';
var type = typeof val;
if (type === 'boolean') return 'boolean';
if (type === 'string') return 'string';
if (type === 'number') return 'number';
if (type === 'symbol') return 'symbol';
if (type === 'function') {
return isGeneratorFn(val) ? 'generatorfunction' : 'function';
}
if (isArray(val)) return 'array';
if (isBuffer(val)) return 'buffer';
if (isArguments(val)) return 'arguments';
if (isDate(val)) return 'date';
if (isError(val)) return 'error';
if (isRegexp(val)) return 'regexp';
switch (ctorName(val)) {
case 'Symbol': return 'symbol';
case 'Promise': return 'promise';
// Set, Map, WeakSet, WeakMap
case 'WeakMap': return 'weakmap';
case 'WeakSet': return 'weakset';
case 'Map': return 'map';
case 'Set': return 'set';
// 8-bit typed arrays
case 'Int8Array': return 'int8array';
case 'Uint8Array': return 'uint8array';
case 'Uint8ClampedArray': return 'uint8clampedarray';
// 16-bit typed arrays
case 'Int16Array': return 'int16array';
case 'Uint16Array': return 'uint16array';
// 32-bit typed arrays
case 'Int32Array': return 'int32array';
case 'Uint32Array': return 'uint32array';
case 'Float32Array': return 'float32array';
case 'Float64Array': return 'float64array';
}
if (isGeneratorObj(val)) {
return 'generator';
}
// Non-plain objects
type = toString.call(val);
switch (type) {
case '[object Object]': return 'object';
// iterators
case '[object Map Iterator]': return 'mapiterator';
case '[object Set Iterator]': return 'setiterator';
case '[object String Iterator]': return 'stringiterator';
case '[object Array Iterator]': return 'arrayiterator';
}
// other
return type.slice(8, -1).toLowerCase().replace(/\s/g, '');
};
function ctorName(val) {
return val.constructor ? val.constructor.name : null;
}
function isArray(val) {
if (Array.isArray) return Array.isArray(val);
return val instanceof Array;
}
function isError(val) {
return val instanceof Error || (typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number');
}
function isDate(val) {
if (val instanceof Date) return true;
return typeof val.toDateString === 'function'
&& typeof val.getDate === 'function'
&& typeof val.setDate === 'function';
}
function isRegexp(val) {
if (val instanceof RegExp) return true;
return typeof val.flags === 'string'
&& typeof val.ignoreCase === 'boolean'
&& typeof val.multiline === 'boolean'
&& typeof val.global === 'boolean';
}
function isGeneratorFn(name, val) {
return ctorName(name) === 'GeneratorFunction';
}
function isGeneratorObj(val) {
return typeof val.throw === 'function'
&& typeof val.return === 'function'
&& typeof val.next === 'function';
}
function isArguments(val) {
try {
if (typeof val.length === 'number' && typeof val.callee === 'function') {
return true;
}
} catch (err) {
if (err.message.indexOf('callee') !== -1) {
return true;
}
}
return false;
}
/**
* If you need to support Safari 5-7 (8-10 yr-old browser),
* take a look at https://github.com/feross/is-buffer
*/
function isBuffer(val) {
if (val.constructor && typeof val.constructor.isBuffer === 'function') {
return val.constructor.isBuffer(val);
}
return false;
}

178
node_modules/base/node_modules/kind-of/package.json generated vendored Normal file
View File

@@ -0,0 +1,178 @@
{
"_args": [
[
"kind-of@^6.0.2",
"/home/bernhard/freifunk-app/node_modules/base/node_modules/is-descriptor"
]
],
"_from": "kind-of@>=6.0.2 <7.0.0",
"_id": "kind-of@6.0.2",
"_inCache": true,
"_installable": true,
"_location": "/base/kind-of",
"_nodeVersion": "9.1.0",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/kind-of-6.0.2.tgz_1512153086430_0.774781379615888"
},
"_npmUser": {
"email": "github@sellside.com",
"name": "jonschlinkert"
},
"_npmVersion": "5.5.1",
"_phantomChildren": {},
"_requested": {
"name": "kind-of",
"raw": "kind-of@^6.0.2",
"rawSpec": "^6.0.2",
"scope": null,
"spec": ">=6.0.2 <7.0.0",
"type": "range"
},
"_requiredBy": [
"/base/is-accessor-descriptor",
"/base/is-data-descriptor",
"/base/is-descriptor"
],
"_resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
"_shasum": "01146b36a6218e64e58f3a8d66de5d7fc6f6d051",
"_shrinkwrap": null,
"_spec": "kind-of@^6.0.2",
"_where": "/home/bernhard/freifunk-app/node_modules/base/node_modules/is-descriptor",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"bugs": {
"url": "https://github.com/jonschlinkert/kind-of/issues"
},
"contributors": [
{
"name": "David Fox-Powell",
"url": "https://dtothefp.github.io/me"
},
{
"name": "James",
"url": "https://twitter.com/aretecode"
},
{
"name": "Jon Schlinkert",
"url": "http://twitter.com/jonschlinkert"
},
{
"name": "Ken Sheedlo",
"url": "kensheedlo.com"
},
{
"name": "laggingreflex",
"url": "https://github.com/laggingreflex"
},
{
"name": "Miguel Mota",
"url": "https://miguelmota.com"
},
{
"name": "Peter deHaan",
"url": "http://about.me/peterdehaan"
},
{
"name": "tunnckoCore",
"url": "https://i.am.charlike.online"
}
],
"dependencies": {},
"description": "Get the native type of a value.",
"devDependencies": {
"benchmarked": "^2.0.0",
"browserify": "^14.4.0",
"gulp-format-md": "^1.0.0",
"mocha": "^4.0.1",
"write": "^1.0.3"
},
"directories": {},
"dist": {
"integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
"shasum": "01146b36a6218e64e58f3a8d66de5d7fc6f6d051",
"tarball": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"gitHead": "1491da72e8d276479f5f6198a9e79c1379c5d0c7",
"homepage": "https://github.com/jonschlinkert/kind-of",
"keywords": [
"arguments",
"array",
"boolean",
"check",
"date",
"function",
"is",
"is-type",
"is-type-of",
"kind",
"kind-of",
"number",
"object",
"of",
"regexp",
"string",
"test",
"type",
"type-of",
"typeof",
"types"
],
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"name": "doowb",
"email": "brian.woodward@gmail.com"
},
{
"name": "jonschlinkert",
"email": "github@sellside.com"
}
],
"name": "kind-of",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/jonschlinkert/kind-of.git"
},
"scripts": {
"prepublish": "browserify -o browser.js -e index.js -s index --bare",
"test": "mocha"
},
"verb": {
"layout": "default",
"lint": {
"reflinks": true
},
"plugins": [
"gulp-format-md"
],
"reflinks": [
"type-of",
"typeof",
"verb"
],
"related": {
"list": [
"is-glob",
"is-number",
"is-primitive"
]
},
"tasks": [
"readme"
],
"toc": false
},
"version": "6.0.2"
}

184
node_modules/base/package.json generated vendored Normal file
View File

@@ -0,0 +1,184 @@
{
"_args": [
[
"base@^0.11.1",
"/home/bernhard/freifunk-app/node_modules/snapdragon"
]
],
"_from": "base@>=0.11.1 <0.12.0",
"_id": "base@0.11.2",
"_inCache": true,
"_installable": true,
"_location": "/base",
"_nodeVersion": "8.4.0",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/base-0.11.2.tgz_1504834551853_0.9452250017784536"
},
"_npmUser": {
"email": "github@sellside.com",
"name": "jonschlinkert"
},
"_npmVersion": "5.4.1",
"_phantomChildren": {},
"_requested": {
"name": "base",
"raw": "base@^0.11.1",
"rawSpec": "^0.11.1",
"scope": null,
"spec": ">=0.11.1 <0.12.0",
"type": "range"
},
"_requiredBy": [
"/snapdragon"
],
"_resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz",
"_shasum": "7bde5ced145b6d551a90db87f83c558b4eb48a8f",
"_shrinkwrap": null,
"_spec": "base@^0.11.1",
"_where": "/home/bernhard/freifunk-app/node_modules/snapdragon",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"bugs": {
"url": "https://github.com/node-base/base/issues"
},
"contributors": [
{
"name": "Brian Woodward",
"url": "https://twitter.com/doowb"
},
{
"name": "John O'Donnell",
"url": "https://github.com/criticalmash"
},
{
"name": "Jon Schlinkert",
"url": "http://twitter.com/jonschlinkert"
},
{
"name": "tunnckoCore",
"url": "https://i.am.charlike.online"
},
{
"url": "https://github.com/wtgtybhertgeghgtwtg"
}
],
"dependencies": {
"cache-base": "^1.0.1",
"class-utils": "^0.3.5",
"component-emitter": "^1.2.1",
"define-property": "^1.0.0",
"isobject": "^3.0.1",
"mixin-deep": "^1.2.0",
"pascalcase": "^0.1.1"
},
"description": "base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting with a handful of common methods, like `set`, `get`, `del` and `use`.",
"devDependencies": {
"gulp": "^3.9.1",
"gulp-eslint": "^4.0.0",
"gulp-format-md": "^1.0.0",
"gulp-istanbul": "^1.1.2",
"gulp-mocha": "^3.0.1",
"helper-coverage": "^0.1.3",
"mocha": "^3.5.0",
"should": "^13.0.1",
"through2": "^2.0.3",
"verb-generate-readme": "^0.6.0"
},
"directories": {},
"dist": {
"integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==",
"shasum": "7bde5ced145b6d551a90db87f83c558b4eb48a8f",
"tarball": "https://registry.npmjs.org/base/-/base-0.11.2.tgz"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"gitHead": "1885b1dc37dff5479d852dd0810d32207e190bab",
"homepage": "https://github.com/node-base/base",
"keywords": [
"base",
"boilerplate",
"cache",
"del",
"get",
"inherit",
"methods",
"set",
"starter",
"unset",
"visit"
],
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"name": "doowb",
"email": "brian.woodward@gmail.com"
},
{
"name": "jonschlinkert",
"email": "github@sellside.com"
}
],
"name": "base",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/node-base/base.git"
},
"scripts": {
"test": "mocha"
},
"verb": {
"helpers": [
"helper-coverage"
],
"layout": "default",
"lint": {
"reflinks": true
},
"plugins": [
"gulp-format-md"
],
"reflinks": [
"assemble",
"boilerplate",
"cache-base",
"class-utils",
"generate",
"scaffold",
"static-extend",
"verb"
],
"related": {
"description": "There are a number of different plugins available for extending base. Let us know if you create your own!",
"hightlight": "generate",
"list": [
"base-cwd",
"base-data",
"base-fs",
"base-generators",
"base-option",
"base-pipeline",
"base-pkg",
"base-plugins",
"base-questions",
"base-store",
"base-task"
]
},
"run": true,
"tasks": [
"readme"
],
"toc": false
},
"version": "0.11.2"
}