initial checkin
This commit is contained in:
parent
8f1212e20e
commit
19298ea310
58
native/index.d.ts
vendored
Normal file
58
native/index.d.ts
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
import { IonicNativePlugin } from '@ionic-native/core';
|
||||
export interface Printer {
|
||||
name: string;
|
||||
address: string;
|
||||
}
|
||||
export interface DiscoveryResult {
|
||||
printers: Array<Printer>;
|
||||
}
|
||||
export interface PrinterStatus {
|
||||
connected: boolean;
|
||||
isReadyToPrint?: boolean;
|
||||
isPaused?: boolean;
|
||||
isReceiveBufferFull?: boolean;
|
||||
isRibbonOut?: boolean;
|
||||
isPaperOut?: boolean;
|
||||
isHeadTooHot?: boolean;
|
||||
isHeadOpen?: boolean;
|
||||
isHeadCold?: boolean;
|
||||
isPartialFormatInProgress?: boolean;
|
||||
}
|
||||
/**
|
||||
* @name Zebra Printer
|
||||
* @description
|
||||
* This plugin does something
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { ZebraPrinter } from '@ionic-native/zebra-printer';
|
||||
*
|
||||
*
|
||||
* constructor(private zebraPrinter: ZebraPrinter) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.zebraPrinter.functionName('Hello', 123)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
export declare class ZebraPrinter extends IonicNativePlugin {
|
||||
echo(options: {
|
||||
value: string;
|
||||
}): Promise<any>;
|
||||
print(options: {
|
||||
cpcl: string;
|
||||
}): Promise<any>;
|
||||
isConnected(): Promise<boolean>;
|
||||
printerStatus(options: {
|
||||
MACAddress: string;
|
||||
}): Promise<PrinterStatus>;
|
||||
connect(options: {
|
||||
MACAddress: string;
|
||||
}): Promise<boolean>;
|
||||
disconnect(): Promise<boolean>;
|
||||
discover(): Promise<DiscoveryResult>;
|
||||
}
|
127
native/index.js
Normal file
127
native/index.js
Normal file
@ -0,0 +1,127 @@
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
/**
|
||||
* This is a template for new plugin wrappers
|
||||
*
|
||||
* TODO:
|
||||
* - Add/Change information below
|
||||
* - Document usage (importing, executing main functionality)
|
||||
* - Remove any imports that you are not using
|
||||
* - Remove all the comments included in this template, EXCEPT the @Plugin wrapper docs and any other docs you added
|
||||
* - Remove this note
|
||||
*
|
||||
*/
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
/**
|
||||
* @name Zebra Printer
|
||||
* @description
|
||||
* This plugin does something
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { ZebraPrinter } from '@ionic-native/zebra-printer';
|
||||
*
|
||||
*
|
||||
* constructor(private zebraPrinter: ZebraPrinter) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.zebraPrinter.functionName('Hello', 123)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
var ZebraPrinter = (function (_super) {
|
||||
__extends(ZebraPrinter, _super);
|
||||
function ZebraPrinter() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
ZebraPrinter.prototype.echo = function (options) { return; };
|
||||
ZebraPrinter.prototype.print = function (options) { return; };
|
||||
ZebraPrinter.prototype.isConnected = function () { return; };
|
||||
ZebraPrinter.prototype.printerStatus = function (options) { return; };
|
||||
ZebraPrinter.prototype.connect = function (options) { return; };
|
||||
ZebraPrinter.prototype.disconnect = function () { return; };
|
||||
ZebraPrinter.prototype.discover = function () { return; };
|
||||
ZebraPrinter.decorators = [
|
||||
{ type: Injectable },
|
||||
];
|
||||
/** @nocollapse */
|
||||
ZebraPrinter.ctorParameters = function () { return []; };
|
||||
__decorate([
|
||||
Cordova(),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Object]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], ZebraPrinter.prototype, "echo", null);
|
||||
__decorate([
|
||||
Cordova(),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Object]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], ZebraPrinter.prototype, "print", null);
|
||||
__decorate([
|
||||
Cordova(),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", []),
|
||||
__metadata("design:returntype", Promise)
|
||||
], ZebraPrinter.prototype, "isConnected", null);
|
||||
__decorate([
|
||||
Cordova(),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Object]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], ZebraPrinter.prototype, "printerStatus", null);
|
||||
__decorate([
|
||||
Cordova(),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Object]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], ZebraPrinter.prototype, "connect", null);
|
||||
__decorate([
|
||||
Cordova(),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", []),
|
||||
__metadata("design:returntype", Promise)
|
||||
], ZebraPrinter.prototype, "disconnect", null);
|
||||
__decorate([
|
||||
Cordova(),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", []),
|
||||
__metadata("design:returntype", Promise)
|
||||
], ZebraPrinter.prototype, "discover", null);
|
||||
ZebraPrinter = __decorate([
|
||||
Plugin({
|
||||
pluginName: 'ZebraPrinter',
|
||||
plugin: '',
|
||||
pluginRef: '',
|
||||
repo: '',
|
||||
install: '',
|
||||
installVariables: [],
|
||||
platforms: [] // Array of platforms supported, example: ['Android', 'iOS']
|
||||
})
|
||||
], ZebraPrinter);
|
||||
return ZebraPrinter;
|
||||
}(IonicNativePlugin));
|
||||
export { ZebraPrinter };
|
||||
//# sourceMappingURL=index.js.map
|
1
native/index.js.map
Normal file
1
native/index.js.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/@ionic-native/plugins/zebra-printer/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,UAAA,EAAW,MAAO,eAAA,CAAgB;AAC3C,OAAO,EAAE,MAAA,EAAQ,OAAA,EAAS,iBAAA,EAAkB,MAAO,oBAAA,CAAqB;AAwBxE;;;;;;;;;;;;;;;;;;;;GAoBG;AAWH;IAAkC,gCAAiB;IAAnD;;IAqBA,CAAC;IAnBC,2BAAI,GAAJ,UAAK,OAA0B,IAAkB,MAAM,CAAC,CAAC,CAAC;IAE1D,4BAAK,GAAL,UAAM,OAAyB,IAAkB,MAAM,CAAC,CAAC,CAAC;IAE1D,kCAAW,GAAX,cAAkC,MAAM,CAAC,CAAC,CAAC;IAE3C,oCAAa,GAAb,UAAc,OAA+B,IAA4B,MAAM,CAAC,CAAC,CAAC;IAElF,8BAAO,GAAP,UAAQ,OAA+B,IAAsB,MAAM,CAAC,CAAC,CAAC;IAEtE,iCAAU,GAAV,cAAiC,MAAM,CAAC,CAAC,CAAC;IAE1C,+BAAQ,GAAR,cAAuC,MAAM,CAAC,CAAC,CAAC;IAC3C,uBAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,UAAU,EAAE;KACnB,CAAC;IACF,kBAAkB;IACX,2BAAc,GAAmE,cAAM,OAAA,EAC7F,EAD6F,CAC7F,CAAC;IAlBA;QADC,OAAO,EAAE;;;;4CACgD;IAE1D;QADC,OAAO,EAAE;;;;6CACgD;IAE1D;QADC,OAAO,EAAE;;;;mDACiC;IAE3C;QADC,OAAO,EAAE;;;;qDACwE;IAElF;QADC,OAAO,EAAE;;;;+CAC4D;IAEtE;QADC,OAAO,EAAE;;;;kDACgC;IAE1C;QADC,OAAO,EAAE;;;;gDACsC;IAdrC,YAAY;QAVxB,MAAM,CAAC;YACN,UAAU,EAAE,cAAc;YAC1B,MAAM,EAAE,EAAE;YACV,SAAS,EAAE,EAAE;YACb,IAAI,EAAE,EAAE;YACR,OAAO,EAAE,EAAE;YACX,gBAAgB,EAAE,EAAE;YACpB,SAAS,EAAE,EAAE,CAAC,4DAA4D;SAC3E,CAAC;OAEW,YAAY,CAqBxB;IAAD,mBAAC;CArBD,AAqBC,CArBiC,iBAAiB,GAqBlD;SArBY,YAAY","file":"index.js","sourceRoot":"","sourcesContent":["/**\n * This is a template for new plugin wrappers\n *\n * TODO:\n * - Add/Change information below\n * - Document usage (importing, executing main functionality)\n * - Remove any imports that you are not using\n * - Remove all the comments included in this template, EXCEPT the @Plugin wrapper docs and any other docs you added\n * - Remove this note\n *\n */\nimport { Injectable } from '@angular/core';\nimport { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';\n\nexport interface Printer {\n name: string;\n address: string;\n}\n\nexport interface DiscoveryResult {\n printers: Array<Printer>;\n}\n\nexport interface PrinterStatus {\n connected: boolean;\n isReadyToPrint?: boolean;\n isPaused?: boolean;\n isReceiveBufferFull?: boolean;\n isRibbonOut?: boolean;\n isPaperOut?: boolean;\n isHeadTooHot?: boolean;\n isHeadOpen?: boolean;\n isHeadCold?: boolean;\n isPartialFormatInProgress?: boolean;\n}\n\n/**\n * @name Zebra Printer\n * @description\n * This plugin does something\n *\n * @usage\n * ```typescript\n * import { ZebraPrinter } from '@ionic-native/zebra-printer';\n *\n *\n * constructor(private zebraPrinter: ZebraPrinter) { }\n *\n * ...\n *\n *\n * this.zebraPrinter.functionName('Hello', 123)\n * .then((res: any) => console.log(res))\n * .catch((error: any) => console.error(error));\n *\n * ```\n */\n@Plugin({\n pluginName: 'ZebraPrinter',\n plugin: '', // npm package name, example: cordova-plugin-camera\n pluginRef: '', // the variable reference to call the plugin, example: navigator.geolocation\n repo: '', // the github repository URL for the plugin\n install: '', // OPTIONAL install command, in case the plugin requires variables\n installVariables: [], // OPTIONAL the plugin requires variables\n platforms: [] // Array of platforms supported, example: ['Android', 'iOS']\n})\n\nexport class ZebraPrinter extends IonicNativePlugin {\n @Cordova()\n echo(options: { value: string }): Promise<any> { return; }\n @Cordova()\n print(options: { cpcl: string }): Promise<any> { return; }\n @Cordova()\n isConnected(): Promise<boolean> { return; }\n @Cordova()\n printerStatus(options: { MACAddress: string }): Promise<PrinterStatus> { return; }\n @Cordova()\n connect(options: { MACAddress: string }): Promise<boolean> { return; }\n @Cordova()\n disconnect(): Promise<boolean> { return; }\n @Cordova()\n discover(): Promise<DiscoveryResult> { return; }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
1
native/index.metadata.json
Normal file
1
native/index.metadata.json
Normal file
@ -0,0 +1 @@
|
||||
[{"__symbolic":"module","version":3,"metadata":{"Printer":{"__symbolic":"interface"},"DiscoveryResult":{"__symbolic":"interface"},"PrinterStatus":{"__symbolic":"interface"},"ZebraPrinter":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@ionic-native/core","name":"IonicNativePlugin"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Plugin"},"arguments":[{"pluginName":"ZebraPrinter","plugin":"","pluginRef":"","repo":"","install":"","installVariables":[],"platforms":[]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"echo":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"print":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"isConnected":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"printerStatus":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"connect":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"disconnect":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"discover":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}]}}}},{"__symbolic":"module","version":1,"metadata":{"Printer":{"__symbolic":"interface"},"DiscoveryResult":{"__symbolic":"interface"},"PrinterStatus":{"__symbolic":"interface"},"ZebraPrinter":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@ionic-native/core","name":"IonicNativePlugin"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Plugin"},"arguments":[{"pluginName":"ZebraPrinter","plugin":"","pluginRef":"","repo":"","install":"","installVariables":[],"platforms":[]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"echo":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"print":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"isConnected":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"printerStatus":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"connect":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"disconnect":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"discover":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}]}}}}]
|
18
native/package.json
Normal file
18
native/package.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "@ionic-native/zebra-printer",
|
||||
"version": "4.7.0",
|
||||
"description": "Ionic Native - Native plugins for ionic apps",
|
||||
"module": "index.js",
|
||||
"typings": "index.d.ts",
|
||||
"author": "ionic",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"@ionic-native/core": "^4.2.0",
|
||||
"@angular/core": "*",
|
||||
"rxjs": "^5.0.1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ionic-team/ionic-native.git"
|
||||
}
|
||||
}
|
1
node_modules/.bin/atob
generated
vendored
Symbolic link
1
node_modules/.bin/atob
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
../atob/bin/atob.js
|
1
node_modules/.bin/color-support
generated
vendored
Symbolic link
1
node_modules/.bin/color-support
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
../color-support/bin.js
|
1
node_modules/.bin/gulp
generated
vendored
Symbolic link
1
node_modules/.bin/gulp
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
../gulp/bin/gulp.js
|
1
node_modules/.bin/mkdirp
generated
vendored
Symbolic link
1
node_modules/.bin/mkdirp
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
../mkdirp/bin/cmd.js
|
1
node_modules/.bin/semver
generated
vendored
Symbolic link
1
node_modules/.bin/semver
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
../semver/bin/semver
|
1
node_modules/.bin/strip-bom
generated
vendored
Symbolic link
1
node_modules/.bin/strip-bom
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
../strip-bom/cli.js
|
1
node_modules/.bin/user-home
generated
vendored
Symbolic link
1
node_modules/.bin/user-home
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
../user-home/cli.js
|
1
node_modules/.bin/which
generated
vendored
Symbolic link
1
node_modules/.bin/which
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
../which/bin/which
|
21
node_modules/ansi-gray/LICENSE
generated
vendored
Normal file
21
node_modules/ansi-gray/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) <%= year() %>, 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.
|
14
node_modules/ansi-gray/index.js
generated
vendored
Normal file
14
node_modules/ansi-gray/index.js
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
/*!
|
||||
* ansi-gray <https://github.com/jonschlinkert/ansi-gray>
|
||||
*
|
||||
* Copyright (c) 2015, Jon Schlinkert.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var wrap = require('ansi-wrap');
|
||||
|
||||
module.exports = function gray(message) {
|
||||
return wrap(90, 39, message);
|
||||
};
|
86
node_modules/ansi-gray/package.json
generated
vendored
Normal file
86
node_modules/ansi-gray/package.json
generated
vendored
Normal file
@ -0,0 +1,86 @@
|
||||
{
|
||||
"_from": "ansi-gray@^0.1.1",
|
||||
"_id": "ansi-gray@0.1.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=",
|
||||
"_location": "/ansi-gray",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "ansi-gray@^0.1.1",
|
||||
"name": "ansi-gray",
|
||||
"escapedName": "ansi-gray",
|
||||
"rawSpec": "^0.1.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^0.1.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/fancy-log"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz",
|
||||
"_shasum": "2962cf54ec9792c48510a3deb524436861ef7251",
|
||||
"_spec": "ansi-gray@^0.1.1",
|
||||
"_where": "/Users/evanm/src/zebraPrinter/ZebraPrinter/node_modules/fancy-log",
|
||||
"author": {
|
||||
"name": "Jon Schlinkert",
|
||||
"url": "https://github.com/jonschlinkert"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/ansi-gray/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"ansi-wrap": "0.1.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "The color gray, in ansi.",
|
||||
"devDependencies": {
|
||||
"mocha": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/jonschlinkert/ansi-gray",
|
||||
"keywords": [
|
||||
"gray",
|
||||
"256",
|
||||
"ansi",
|
||||
"cli",
|
||||
"color",
|
||||
"colors",
|
||||
"colour",
|
||||
"command",
|
||||
"command-line",
|
||||
"console",
|
||||
"format",
|
||||
"formatting",
|
||||
"iterm",
|
||||
"log",
|
||||
"logging",
|
||||
"rgb",
|
||||
"shell",
|
||||
"string",
|
||||
"style",
|
||||
"styles",
|
||||
"styling",
|
||||
"terminal",
|
||||
"text",
|
||||
"tty",
|
||||
"xterm"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "ansi-gray",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/jonschlinkert/ansi-gray.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "0.1.1"
|
||||
}
|
74
node_modules/ansi-gray/readme.md
generated
vendored
Normal file
74
node_modules/ansi-gray/readme.md
generated
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
# ansi-gray [](http://badge.fury.io/js/ansi-gray)
|
||||
|
||||
> The color gray, in ansi.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/)
|
||||
|
||||
```sh
|
||||
$ npm i ansi-gray --save
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var gray = require('ansi-gray');
|
||||
```
|
||||
|
||||
## Related projects
|
||||
|
||||
* [ansi-reset](https://github.com/jonschlinkert/ansi-reset)
|
||||
* [ansi-bold](https://github.com/jonschlinkert/ansi-bold)
|
||||
* [ansi-dim](https://github.com/jonschlinkert/ansi-dim)
|
||||
* [ansi-italic](https://github.com/jonschlinkert/ansi-italic)
|
||||
* [ansi-underline](https://github.com/jonschlinkert/ansi-underline)
|
||||
* [ansi-inverse](https://github.com/jonschlinkert/ansi-inverse)
|
||||
* [ansi-hidden](https://github.com/jonschlinkert/ansi-hidden)
|
||||
* [ansi-strikethrough](https://github.com/jonschlinkert/ansi-strikethrough)
|
||||
* [ansi-black](https://github.com/jonschlinkert/ansi-black)
|
||||
* [ansi-red](https://github.com/jonschlinkert/ansi-red)
|
||||
* [ansi-green](https://github.com/jonschlinkert/ansi-green)
|
||||
* [ansi-yellow](https://github.com/jonschlinkert/ansi-yellow)
|
||||
* [ansi-blue](https://github.com/jonschlinkert/ansi-blue)
|
||||
* [ansi-magenta](https://github.com/jonschlinkert/ansi-magenta)
|
||||
* [ansi-cyan](https://github.com/jonschlinkert/ansi-cyan)
|
||||
* [ansi-white](https://github.com/jonschlinkert/ansi-white)
|
||||
* [ansi-gray](https://github.com/jonschlinkert/ansi-gray)
|
||||
* [ansi-grey](https://github.com/jonschlinkert/ansi-grey)
|
||||
* [ansi-bgblack](https://github.com/jonschlinkert/ansi-bgblack)
|
||||
* [ansi-bgred](https://github.com/jonschlinkert/ansi-bgred)
|
||||
* [ansi-bggreen](https://github.com/jonschlinkert/ansi-bggreen)
|
||||
* [ansi-bgyellow](https://github.com/jonschlinkert/ansi-bgyellow)
|
||||
* [ansi-bgblue](https://github.com/jonschlinkert/ansi-bgblue)
|
||||
* [ansi-bgmagenta](https://github.com/jonschlinkert/ansi-bgmagenta)
|
||||
* [ansi-bgcyan](https://github.com/jonschlinkert/ansi-bgcyan)
|
||||
* [ansi-bgwhite](https://github.com/jonschlinkert/ansi-bgwhite)
|
||||
|
||||
## Running tests
|
||||
|
||||
Install dev dependencies:
|
||||
|
||||
```sh
|
||||
$ npm i -d && npm test
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/ansi-gray/issues/new)
|
||||
|
||||
## Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
+ [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
|
||||
|
||||
## License
|
||||
|
||||
Copyright © 2015 Jon Schlinkert
|
||||
Released under the MIT license.
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 21, 2015._
|
4
node_modules/ansi-regex/index.js
generated
vendored
Normal file
4
node_modules/ansi-regex/index.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = function () {
|
||||
return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g;
|
||||
};
|
21
node_modules/ansi-regex/license
generated
vendored
Normal file
21
node_modules/ansi-regex/license
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
109
node_modules/ansi-regex/package.json
generated
vendored
Normal file
109
node_modules/ansi-regex/package.json
generated
vendored
Normal file
@ -0,0 +1,109 @@
|
||||
{
|
||||
"_from": "ansi-regex@^2.0.0",
|
||||
"_id": "ansi-regex@2.1.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
||||
"_location": "/ansi-regex",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "ansi-regex@^2.0.0",
|
||||
"name": "ansi-regex",
|
||||
"escapedName": "ansi-regex",
|
||||
"rawSpec": "^2.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/has-ansi",
|
||||
"/strip-ansi"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||
"_shasum": "c3b33ab5ee360d86e0e628f0468ae7ef27d654df",
|
||||
"_spec": "ansi-regex@^2.0.0",
|
||||
"_where": "/Users/evanm/src/zebraPrinter/ZebraPrinter/node_modules/has-ansi",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/chalk/ansi-regex/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Regular expression for matching ANSI escape codes",
|
||||
"devDependencies": {
|
||||
"ava": "0.17.0",
|
||||
"xo": "0.16.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/chalk/ansi-regex#readme",
|
||||
"keywords": [
|
||||
"ansi",
|
||||
"styles",
|
||||
"color",
|
||||
"colour",
|
||||
"colors",
|
||||
"terminal",
|
||||
"console",
|
||||
"cli",
|
||||
"string",
|
||||
"tty",
|
||||
"escape",
|
||||
"formatting",
|
||||
"rgb",
|
||||
"256",
|
||||
"shell",
|
||||
"xterm",
|
||||
"command-line",
|
||||
"text",
|
||||
"regex",
|
||||
"regexp",
|
||||
"re",
|
||||
"match",
|
||||
"test",
|
||||
"find",
|
||||
"pattern"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
{
|
||||
"name": "Joshua Appelman",
|
||||
"email": "jappelman@xebia.com",
|
||||
"url": "jbnicolai.com"
|
||||
},
|
||||
{
|
||||
"name": "JD Ballard",
|
||||
"email": "i.am.qix@gmail.com",
|
||||
"url": "github.com/qix-"
|
||||
}
|
||||
],
|
||||
"name": "ansi-regex",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/chalk/ansi-regex.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava --verbose",
|
||||
"view-supported": "node fixtures/view-codes.js"
|
||||
},
|
||||
"version": "2.1.1",
|
||||
"xo": {
|
||||
"rules": {
|
||||
"guard-for-in": 0,
|
||||
"no-loop-func": 0
|
||||
}
|
||||
}
|
||||
}
|
39
node_modules/ansi-regex/readme.md
generated
vendored
Normal file
39
node_modules/ansi-regex/readme.md
generated
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
# ansi-regex [](https://travis-ci.org/chalk/ansi-regex)
|
||||
|
||||
> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save ansi-regex
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const ansiRegex = require('ansi-regex');
|
||||
|
||||
ansiRegex().test('\u001b[4mcake\u001b[0m');
|
||||
//=> true
|
||||
|
||||
ansiRegex().test('cake');
|
||||
//=> false
|
||||
|
||||
'\u001b[4mcake\u001b[0m'.match(ansiRegex());
|
||||
//=> ['\u001b[4m', '\u001b[0m']
|
||||
```
|
||||
|
||||
## FAQ
|
||||
|
||||
### Why do you test for codes not in the ECMA 48 standard?
|
||||
|
||||
Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. If I recall correctly, we test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
|
||||
|
||||
On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
65
node_modules/ansi-styles/index.js
generated
vendored
Normal file
65
node_modules/ansi-styles/index.js
generated
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
'use strict';
|
||||
|
||||
function assembleStyles () {
|
||||
var styles = {
|
||||
modifiers: {
|
||||
reset: [0, 0],
|
||||
bold: [1, 22], // 21 isn't widely supported and 22 does the same thing
|
||||
dim: [2, 22],
|
||||
italic: [3, 23],
|
||||
underline: [4, 24],
|
||||
inverse: [7, 27],
|
||||
hidden: [8, 28],
|
||||
strikethrough: [9, 29]
|
||||
},
|
||||
colors: {
|
||||
black: [30, 39],
|
||||
red: [31, 39],
|
||||
green: [32, 39],
|
||||
yellow: [33, 39],
|
||||
blue: [34, 39],
|
||||
magenta: [35, 39],
|
||||
cyan: [36, 39],
|
||||
white: [37, 39],
|
||||
gray: [90, 39]
|
||||
},
|
||||
bgColors: {
|
||||
bgBlack: [40, 49],
|
||||
bgRed: [41, 49],
|
||||
bgGreen: [42, 49],
|
||||
bgYellow: [43, 49],
|
||||
bgBlue: [44, 49],
|
||||
bgMagenta: [45, 49],
|
||||
bgCyan: [46, 49],
|
||||
bgWhite: [47, 49]
|
||||
}
|
||||
};
|
||||
|
||||
// fix humans
|
||||
styles.colors.grey = styles.colors.gray;
|
||||
|
||||
Object.keys(styles).forEach(function (groupName) {
|
||||
var group = styles[groupName];
|
||||
|
||||
Object.keys(group).forEach(function (styleName) {
|
||||
var style = group[styleName];
|
||||
|
||||
styles[styleName] = group[styleName] = {
|
||||
open: '\u001b[' + style[0] + 'm',
|
||||
close: '\u001b[' + style[1] + 'm'
|
||||
};
|
||||
});
|
||||
|
||||
Object.defineProperty(styles, groupName, {
|
||||
value: group,
|
||||
enumerable: false
|
||||
});
|
||||
});
|
||||
|
||||
return styles;
|
||||
}
|
||||
|
||||
Object.defineProperty(module, 'exports', {
|
||||
enumerable: true,
|
||||
get: assembleStyles
|
||||
});
|
21
node_modules/ansi-styles/license
generated
vendored
Normal file
21
node_modules/ansi-styles/license
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
90
node_modules/ansi-styles/package.json
generated
vendored
Normal file
90
node_modules/ansi-styles/package.json
generated
vendored
Normal file
@ -0,0 +1,90 @@
|
||||
{
|
||||
"_from": "ansi-styles@^2.2.1",
|
||||
"_id": "ansi-styles@2.2.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
|
||||
"_location": "/ansi-styles",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "ansi-styles@^2.2.1",
|
||||
"name": "ansi-styles",
|
||||
"escapedName": "ansi-styles",
|
||||
"rawSpec": "^2.2.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.2.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/chalk"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
||||
"_shasum": "b432dd3358b634cf75e1e4664368240533c1ddbe",
|
||||
"_spec": "ansi-styles@^2.2.1",
|
||||
"_where": "/Users/evanm/src/zebraPrinter/ZebraPrinter/node_modules/chalk",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/chalk/ansi-styles/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "ANSI escape codes for styling strings in the terminal",
|
||||
"devDependencies": {
|
||||
"mocha": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/chalk/ansi-styles#readme",
|
||||
"keywords": [
|
||||
"ansi",
|
||||
"styles",
|
||||
"color",
|
||||
"colour",
|
||||
"colors",
|
||||
"terminal",
|
||||
"console",
|
||||
"cli",
|
||||
"string",
|
||||
"tty",
|
||||
"escape",
|
||||
"formatting",
|
||||
"rgb",
|
||||
"256",
|
||||
"shell",
|
||||
"xterm",
|
||||
"log",
|
||||
"logging",
|
||||
"command-line",
|
||||
"text"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
{
|
||||
"name": "Joshua Appelman",
|
||||
"email": "jappelman@xebia.com",
|
||||
"url": "jbnicolai.com"
|
||||
}
|
||||
],
|
||||
"name": "ansi-styles",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/chalk/ansi-styles.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "2.2.1"
|
||||
}
|
86
node_modules/ansi-styles/readme.md
generated
vendored
Normal file
86
node_modules/ansi-styles/readme.md
generated
vendored
Normal file
@ -0,0 +1,86 @@
|
||||
# ansi-styles [](https://travis-ci.org/chalk/ansi-styles)
|
||||
|
||||
> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal
|
||||
|
||||
You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings.
|
||||
|
||||

|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save ansi-styles
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var ansi = require('ansi-styles');
|
||||
|
||||
console.log(ansi.green.open + 'Hello world!' + ansi.green.close);
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
Each style has an `open` and `close` property.
|
||||
|
||||
|
||||
## Styles
|
||||
|
||||
### Modifiers
|
||||
|
||||
- `reset`
|
||||
- `bold`
|
||||
- `dim`
|
||||
- `italic` *(not widely supported)*
|
||||
- `underline`
|
||||
- `inverse`
|
||||
- `hidden`
|
||||
- `strikethrough` *(not widely supported)*
|
||||
|
||||
### Colors
|
||||
|
||||
- `black`
|
||||
- `red`
|
||||
- `green`
|
||||
- `yellow`
|
||||
- `blue`
|
||||
- `magenta`
|
||||
- `cyan`
|
||||
- `white`
|
||||
- `gray`
|
||||
|
||||
### Background colors
|
||||
|
||||
- `bgBlack`
|
||||
- `bgRed`
|
||||
- `bgGreen`
|
||||
- `bgYellow`
|
||||
- `bgBlue`
|
||||
- `bgMagenta`
|
||||
- `bgCyan`
|
||||
- `bgWhite`
|
||||
|
||||
|
||||
## Advanced usage
|
||||
|
||||
By default you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module.
|
||||
|
||||
- `ansi.modifiers`
|
||||
- `ansi.colors`
|
||||
- `ansi.bgColors`
|
||||
|
||||
|
||||
###### Example
|
||||
|
||||
```js
|
||||
console.log(ansi.colors.green.open);
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
21
node_modules/ansi-wrap/LICENSE
generated
vendored
Normal file
21
node_modules/ansi-wrap/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015, 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.
|
89
node_modules/ansi-wrap/README.md
generated
vendored
Normal file
89
node_modules/ansi-wrap/README.md
generated
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
# ansi-wrap [](http://badge.fury.io/js/ansi-wrap)
|
||||
|
||||
> Create ansi colors by passing the open and close codes.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/)
|
||||
|
||||
```sh
|
||||
$ npm i ansi-wrap --save
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var wrap = require('ansi-wrap');
|
||||
```
|
||||
|
||||
**Example**
|
||||
|
||||
Pass codes for [ansi magenta background](https://github.com/jonschlinkert/ansi-bgmagenta):
|
||||
|
||||
```js
|
||||
console.log(wrap(45, 49, 'This is a message...'));
|
||||
//=> '\u001b[45mfoo\u001b[49m'
|
||||
```
|
||||
|
||||
Which prints out...
|
||||
|
||||
[](https://www.npmjs.com/)
|
||||
|
||||
## Related projects
|
||||
|
||||
This is used in these projects:
|
||||
|
||||
* [ansi-reset](https://github.com/jonschlinkert/ansi-reset)
|
||||
* [ansi-bold](https://github.com/jonschlinkert/ansi-bold)
|
||||
* [ansi-dim](https://github.com/jonschlinkert/ansi-dim)
|
||||
* [ansi-italic](https://github.com/jonschlinkert/ansi-italic)
|
||||
* [ansi-underline](https://github.com/jonschlinkert/ansi-underline)
|
||||
* [ansi-inverse](https://github.com/jonschlinkert/ansi-inverse)
|
||||
* [ansi-hidden](https://github.com/jonschlinkert/ansi-hidden)
|
||||
* [ansi-strikethrough](https://github.com/jonschlinkert/ansi-strikethrough)
|
||||
* [ansi-black](https://github.com/jonschlinkert/ansi-black)
|
||||
* [ansi-red](https://github.com/jonschlinkert/ansi-red)
|
||||
* [ansi-green](https://github.com/jonschlinkert/ansi-green)
|
||||
* [ansi-yellow](https://github.com/jonschlinkert/ansi-yellow)
|
||||
* [ansi-blue](https://github.com/jonschlinkert/ansi-blue)
|
||||
* [ansi-magenta](https://github.com/jonschlinkert/ansi-magenta)
|
||||
* [ansi-cyan](https://github.com/jonschlinkert/ansi-cyan)
|
||||
* [ansi-white](https://github.com/jonschlinkert/ansi-white)
|
||||
* [ansi-gray](https://github.com/jonschlinkert/ansi-gray)
|
||||
* [ansi-grey](https://github.com/jonschlinkert/ansi-grey)
|
||||
* [ansi-bgblack](https://github.com/jonschlinkert/ansi-bgblack)
|
||||
* [ansi-bgred](https://github.com/jonschlinkert/ansi-bgred)
|
||||
* [ansi-bggreen](https://github.com/jonschlinkert/ansi-bggreen)
|
||||
* [ansi-bgyellow](https://github.com/jonschlinkert/ansi-bgyellow)
|
||||
* [ansi-bgblue](https://github.com/jonschlinkert/ansi-bgblue)
|
||||
* [ansi-bgmagenta](https://github.com/jonschlinkert/ansi-bgmagenta)
|
||||
* [ansi-bgcyan](https://github.com/jonschlinkert/ansi-bgcyan)
|
||||
* [ansi-bgwhite](https://github.com/jonschlinkert/ansi-bgwhite)
|
||||
|
||||
## Running tests
|
||||
|
||||
Install dev dependencies:
|
||||
|
||||
```sh
|
||||
$ npm i -d && npm test
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/ansi-wrap/issues/new)
|
||||
|
||||
## Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
+ [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
|
||||
|
||||
## License
|
||||
|
||||
Copyright © 2015 Jon Schlinkert
|
||||
Released under the MIT license.
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 21, 2015._
|
5
node_modules/ansi-wrap/index.js
generated
vendored
Normal file
5
node_modules/ansi-wrap/index.js
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function(a, b, msg) {
|
||||
return '\u001b['+ a + 'm' + msg + '\u001b[' + b + 'm';
|
||||
};
|
59
node_modules/ansi-wrap/package.json
generated
vendored
Normal file
59
node_modules/ansi-wrap/package.json
generated
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
{
|
||||
"_from": "ansi-wrap@0.1.0",
|
||||
"_id": "ansi-wrap@0.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=",
|
||||
"_location": "/ansi-wrap",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "ansi-wrap@0.1.0",
|
||||
"name": "ansi-wrap",
|
||||
"escapedName": "ansi-wrap",
|
||||
"rawSpec": "0.1.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "0.1.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/ansi-gray"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz",
|
||||
"_shasum": "a82250ddb0015e9a27ca82e82ea603bbfa45efaf",
|
||||
"_spec": "ansi-wrap@0.1.0",
|
||||
"_where": "/Users/evanm/src/zebraPrinter/ZebraPrinter/node_modules/ansi-gray",
|
||||
"author": {
|
||||
"name": "Jon Schlinkert",
|
||||
"url": "https://github.com/jonschlinkert"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/ansi-wrap/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {},
|
||||
"deprecated": false,
|
||||
"description": "Create ansi colors by passing the open and close codes.",
|
||||
"devDependencies": {},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/jonschlinkert/ansi-wrap",
|
||||
"keywords": [],
|
||||
"license": {
|
||||
"type": "MIT",
|
||||
"url": "https://github.com/jonschlinkert/ansi-wrap/blob/master/LICENSE"
|
||||
},
|
||||
"main": "index.js",
|
||||
"name": "ansi-wrap",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/jonschlinkert/ansi-wrap.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "0.1.0"
|
||||
}
|
4
node_modules/archy/.travis.yml
generated
vendored
Normal file
4
node_modules/archy/.travis.yml
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- 0.6
|
||||
- 0.8
|
18
node_modules/archy/LICENSE
generated
vendored
Normal file
18
node_modules/archy/LICENSE
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
This software is released under the MIT license:
|
||||
|
||||
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.
|
24
node_modules/archy/examples/beep.js
generated
vendored
Normal file
24
node_modules/archy/examples/beep.js
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
var archy = require('../');
|
||||
var s = archy({
|
||||
label : 'beep',
|
||||
nodes : [
|
||||
'ity',
|
||||
{
|
||||
label : 'boop',
|
||||
nodes : [
|
||||
{
|
||||
label : 'o_O',
|
||||
nodes : [
|
||||
{
|
||||
label : 'oh',
|
||||
nodes : [ 'hello', 'puny' ]
|
||||
},
|
||||
'human'
|
||||
]
|
||||
},
|
||||
'party\ntime!'
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
console.log(s);
|
25
node_modules/archy/examples/multi_line.js
generated
vendored
Normal file
25
node_modules/archy/examples/multi_line.js
generated
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
var archy = require('../');
|
||||
|
||||
var s = archy({
|
||||
label : 'beep\none\ntwo',
|
||||
nodes : [
|
||||
'ity',
|
||||
{
|
||||
label : 'boop',
|
||||
nodes : [
|
||||
{
|
||||
label : 'o_O\nwheee',
|
||||
nodes : [
|
||||
{
|
||||
label : 'oh',
|
||||
nodes : [ 'hello', 'puny\nmeat' ]
|
||||
},
|
||||
'creature'
|
||||
]
|
||||
},
|
||||
'party\ntime!'
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
console.log(s);
|
35
node_modules/archy/index.js
generated
vendored
Normal file
35
node_modules/archy/index.js
generated
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
module.exports = function archy (obj, prefix, opts) {
|
||||
if (prefix === undefined) prefix = '';
|
||||
if (!opts) opts = {};
|
||||
var chr = function (s) {
|
||||
var chars = {
|
||||
'│' : '|',
|
||||
'└' : '`',
|
||||
'├' : '+',
|
||||
'─' : '-',
|
||||
'┬' : '-'
|
||||
};
|
||||
return opts.unicode === false ? chars[s] : s;
|
||||
};
|
||||
|
||||
if (typeof obj === 'string') obj = { label : obj };
|
||||
|
||||
var nodes = obj.nodes || [];
|
||||
var lines = (obj.label || '').split('\n');
|
||||
var splitter = '\n' + prefix + (nodes.length ? chr('│') : ' ') + ' ';
|
||||
|
||||
return prefix
|
||||
+ lines.join(splitter) + '\n'
|
||||
+ nodes.map(function (node, ix) {
|
||||
var last = ix === nodes.length - 1;
|
||||
var more = node.nodes && node.nodes.length;
|
||||
var prefix_ = prefix + (last ? ' ' : chr('│')) + ' ';
|
||||
|
||||
return prefix
|
||||
+ (last ? chr('└') : chr('├')) + chr('─')
|
||||
+ (more ? chr('┬') : chr('─')) + ' '
|
||||
+ archy(node, prefix_, opts).slice(prefix.length + 2)
|
||||
;
|
||||
}).join('')
|
||||
;
|
||||
};
|
83
node_modules/archy/package.json
generated
vendored
Normal file
83
node_modules/archy/package.json
generated
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
{
|
||||
"_from": "archy@^1.0.0",
|
||||
"_id": "archy@1.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=",
|
||||
"_location": "/archy",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "archy@^1.0.0",
|
||||
"name": "archy",
|
||||
"escapedName": "archy",
|
||||
"rawSpec": "^1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/gulp"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz",
|
||||
"_shasum": "f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40",
|
||||
"_spec": "archy@^1.0.0",
|
||||
"_where": "/Users/evanm/src/zebraPrinter/ZebraPrinter/node_modules/gulp",
|
||||
"author": {
|
||||
"name": "James Halliday",
|
||||
"email": "mail@substack.net",
|
||||
"url": "http://substack.net"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/substack/node-archy/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "render nested hierarchies `npm ls` style with unicode pipes",
|
||||
"devDependencies": {
|
||||
"tap": "~0.3.3",
|
||||
"tape": "~0.1.1"
|
||||
},
|
||||
"homepage": "https://github.com/substack/node-archy#readme",
|
||||
"keywords": [
|
||||
"hierarchy",
|
||||
"npm ls",
|
||||
"unicode",
|
||||
"pretty",
|
||||
"print"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "archy",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@github.com/substack/node-archy.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tap test"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/*.js",
|
||||
"browsers": {
|
||||
"iexplore": [
|
||||
"6.0",
|
||||
"7.0",
|
||||
"8.0",
|
||||
"9.0"
|
||||
],
|
||||
"chrome": [
|
||||
"20.0"
|
||||
],
|
||||
"firefox": [
|
||||
"10.0",
|
||||
"15.0"
|
||||
],
|
||||
"safari": [
|
||||
"5.1"
|
||||
],
|
||||
"opera": [
|
||||
"12.0"
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": "1.0.0"
|
||||
}
|
88
node_modules/archy/readme.markdown
generated
vendored
Normal file
88
node_modules/archy/readme.markdown
generated
vendored
Normal file
@ -0,0 +1,88 @@
|
||||
# archy
|
||||
|
||||
Render nested hierarchies `npm ls` style with unicode pipes.
|
||||
|
||||
[](http://ci.testling.com/substack/node-archy)
|
||||
|
||||
[](http://travis-ci.org/substack/node-archy)
|
||||
|
||||
# example
|
||||
|
||||
``` js
|
||||
var archy = require('archy');
|
||||
var s = archy({
|
||||
label : 'beep',
|
||||
nodes : [
|
||||
'ity',
|
||||
{
|
||||
label : 'boop',
|
||||
nodes : [
|
||||
{
|
||||
label : 'o_O',
|
||||
nodes : [
|
||||
{
|
||||
label : 'oh',
|
||||
nodes : [ 'hello', 'puny' ]
|
||||
},
|
||||
'human'
|
||||
]
|
||||
},
|
||||
'party\ntime!'
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
console.log(s);
|
||||
```
|
||||
|
||||
output
|
||||
|
||||
```
|
||||
beep
|
||||
├── ity
|
||||
└─┬ boop
|
||||
├─┬ o_O
|
||||
│ ├─┬ oh
|
||||
│ │ ├── hello
|
||||
│ │ └── puny
|
||||
│ └── human
|
||||
└── party
|
||||
time!
|
||||
```
|
||||
|
||||
# methods
|
||||
|
||||
var archy = require('archy')
|
||||
|
||||
## archy(obj, prefix='', opts={})
|
||||
|
||||
Return a string representation of `obj` with unicode pipe characters like how
|
||||
`npm ls` looks.
|
||||
|
||||
`obj` should be a tree of nested objects with `'label'` and `'nodes'` fields.
|
||||
`'label'` is a string of text to display at a node level and `'nodes'` is an
|
||||
array of the descendents of the current node.
|
||||
|
||||
If a node is a string, that string will be used as the `'label'` and an empty
|
||||
array of `'nodes'` will be used.
|
||||
|
||||
`prefix` gets prepended to all the lines and is used by the algorithm to
|
||||
recursively update.
|
||||
|
||||
If `'label'` has newlines they will be indented at the present indentation level
|
||||
with the current prefix.
|
||||
|
||||
To disable unicode results in favor of all-ansi output set `opts.unicode` to
|
||||
`false`.
|
||||
|
||||
# install
|
||||
|
||||
With [npm](http://npmjs.org) do:
|
||||
|
||||
```
|
||||
npm install archy
|
||||
```
|
||||
|
||||
# license
|
||||
|
||||
MIT
|
40
node_modules/archy/test/beep.js
generated
vendored
Normal file
40
node_modules/archy/test/beep.js
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
var test = require('tape');
|
||||
var archy = require('../');
|
||||
|
||||
test('beep', function (t) {
|
||||
var s = archy({
|
||||
label : 'beep',
|
||||
nodes : [
|
||||
'ity',
|
||||
{
|
||||
label : 'boop',
|
||||
nodes : [
|
||||
{
|
||||
label : 'o_O',
|
||||
nodes : [
|
||||
{
|
||||
label : 'oh',
|
||||
nodes : [ 'hello', 'puny' ]
|
||||
},
|
||||
'human'
|
||||
]
|
||||
},
|
||||
'party!'
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
t.equal(s, [
|
||||
'beep',
|
||||
'├── ity',
|
||||
'└─┬ boop',
|
||||
' ├─┬ o_O',
|
||||
' │ ├─┬ oh',
|
||||
' │ │ ├── hello',
|
||||
' │ │ └── puny',
|
||||
' │ └── human',
|
||||
' └── party!',
|
||||
''
|
||||
].join('\n'));
|
||||
t.end();
|
||||
});
|
45
node_modules/archy/test/multi_line.js
generated
vendored
Normal file
45
node_modules/archy/test/multi_line.js
generated
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
var test = require('tape');
|
||||
var archy = require('../');
|
||||
|
||||
test('multi-line', function (t) {
|
||||
var s = archy({
|
||||
label : 'beep\none\ntwo',
|
||||
nodes : [
|
||||
'ity',
|
||||
{
|
||||
label : 'boop',
|
||||
nodes : [
|
||||
{
|
||||
label : 'o_O\nwheee',
|
||||
nodes : [
|
||||
{
|
||||
label : 'oh',
|
||||
nodes : [ 'hello', 'puny\nmeat' ]
|
||||
},
|
||||
'creature'
|
||||
]
|
||||
},
|
||||
'party\ntime!'
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
t.equal(s, [
|
||||
'beep',
|
||||
'│ one',
|
||||
'│ two',
|
||||
'├── ity',
|
||||
'└─┬ boop',
|
||||
' ├─┬ o_O',
|
||||
' │ │ wheee',
|
||||
' │ ├─┬ oh',
|
||||
' │ │ ├── hello',
|
||||
' │ │ └── puny',
|
||||
' │ │ meat',
|
||||
' │ └── creature',
|
||||
' └── party',
|
||||
' time!',
|
||||
''
|
||||
].join('\n'));
|
||||
t.end();
|
||||
});
|
40
node_modules/archy/test/non_unicode.js
generated
vendored
Normal file
40
node_modules/archy/test/non_unicode.js
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
var test = require('tape');
|
||||
var archy = require('../');
|
||||
|
||||
test('beep', function (t) {
|
||||
var s = archy({
|
||||
label : 'beep',
|
||||
nodes : [
|
||||
'ity',
|
||||
{
|
||||
label : 'boop',
|
||||
nodes : [
|
||||
{
|
||||
label : 'o_O',
|
||||
nodes : [
|
||||
{
|
||||
label : 'oh',
|
||||
nodes : [ 'hello', 'puny' ]
|
||||
},
|
||||
'human'
|
||||
]
|
||||
},
|
||||
'party!'
|
||||
]
|
||||
}
|
||||
]
|
||||
}, '', { unicode : false });
|
||||
t.equal(s, [
|
||||
'beep',
|
||||
'+-- ity',
|
||||
'`-- boop',
|
||||
' +-- o_O',
|
||||
' | +-- oh',
|
||||
' | | +-- hello',
|
||||
' | | `-- puny',
|
||||
' | `-- human',
|
||||
' `-- party!',
|
||||
''
|
||||
].join('\n'));
|
||||
t.end();
|
||||
});
|
21
node_modules/arr-diff/LICENSE
generated
vendored
Executable file
21
node_modules/arr-diff/LICENSE
generated
vendored
Executable 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.
|
130
node_modules/arr-diff/README.md
generated
vendored
Normal file
130
node_modules/arr-diff/README.md
generated
vendored
Normal file
@ -0,0 +1,130 @@
|
||||
# arr-diff [](https://www.npmjs.com/package/arr-diff) [](https://npmjs.org/package/arr-diff) [](https://travis-ci.org/jonschlinkert/arr-diff)
|
||||
|
||||
> Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install --save arr-diff
|
||||
```
|
||||
|
||||
Install with [yarn](https://yarnpkg.com):
|
||||
|
||||
```sh
|
||||
$ yarn add arr-diff
|
||||
```
|
||||
|
||||
Install with [bower](https://bower.io/)
|
||||
|
||||
```sh
|
||||
$ bower install arr-diff --save
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Returns the difference between the first array and additional arrays.
|
||||
|
||||
```js
|
||||
var diff = require('arr-diff');
|
||||
|
||||
var a = ['a', 'b', 'c', 'd'];
|
||||
var b = ['b', 'c'];
|
||||
|
||||
console.log(diff(a, b))
|
||||
//=> ['a', 'd']
|
||||
```
|
||||
|
||||
## Benchmarks
|
||||
|
||||
This library versus [array-differ](https://github.com/sindresorhus/array-differ), on April 14, 2017:
|
||||
|
||||
```
|
||||
Benchmarking: (4 of 4)
|
||||
· long-dupes
|
||||
· long
|
||||
· med
|
||||
· short
|
||||
|
||||
# benchmark/fixtures/long-dupes.js (100804 bytes)
|
||||
arr-diff-3.0.0 x 822 ops/sec ±0.67% (86 runs sampled)
|
||||
arr-diff-4.0.0 x 2,141 ops/sec ±0.42% (89 runs sampled)
|
||||
array-differ x 708 ops/sec ±0.70% (89 runs sampled)
|
||||
|
||||
fastest is arr-diff-4.0.0
|
||||
|
||||
# benchmark/fixtures/long.js (94529 bytes)
|
||||
arr-diff-3.0.0 x 882 ops/sec ±0.60% (87 runs sampled)
|
||||
arr-diff-4.0.0 x 2,329 ops/sec ±0.97% (83 runs sampled)
|
||||
array-differ x 769 ops/sec ±0.61% (90 runs sampled)
|
||||
|
||||
fastest is arr-diff-4.0.0
|
||||
|
||||
# benchmark/fixtures/med.js (708 bytes)
|
||||
arr-diff-3.0.0 x 856,150 ops/sec ±0.42% (89 runs sampled)
|
||||
arr-diff-4.0.0 x 4,665,249 ops/sec ±1.06% (89 runs sampled)
|
||||
array-differ x 653,888 ops/sec ±1.02% (86 runs sampled)
|
||||
|
||||
fastest is arr-diff-4.0.0
|
||||
|
||||
# benchmark/fixtures/short.js (60 bytes)
|
||||
arr-diff-3.0.0 x 3,078,467 ops/sec ±0.77% (93 runs sampled)
|
||||
arr-diff-4.0.0 x 9,213,296 ops/sec ±0.65% (89 runs sampled)
|
||||
array-differ x 1,337,051 ops/sec ±0.91% (92 runs sampled)
|
||||
|
||||
fastest is arr-diff-4.0.0
|
||||
```
|
||||
|
||||
## About
|
||||
|
||||
### Related projects
|
||||
|
||||
* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.")
|
||||
* [array-filter](https://www.npmjs.com/package/array-filter): Array#filter for older browsers. | [homepage](https://github.com/juliangruber/array-filter "Array#filter for older browsers.")
|
||||
* [array-intersection](https://www.npmjs.com/package/array-intersection): Return an array with the unique values present in _all_ given arrays using strict equality… [more](https://github.com/jonschlinkert/array-intersection) | [homepage](https://github.com/jonschlinkert/array-intersection "Return an array with the unique values present in _all_ given arrays using strict equality for comparisons.")
|
||||
|
||||
### Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
||||
|
||||
### Contributors
|
||||
|
||||
| **Commits** | **Contributor** |
|
||||
| --- | --- |
|
||||
| 33 | [jonschlinkert](https://github.com/jonschlinkert) |
|
||||
| 2 | [paulmillr](https://github.com/paulmillr) |
|
||||
|
||||
### 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 14, 2017._
|
47
node_modules/arr-diff/index.js
generated
vendored
Normal file
47
node_modules/arr-diff/index.js
generated
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
/*!
|
||||
* arr-diff <https://github.com/jonschlinkert/arr-diff>
|
||||
*
|
||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = function diff(arr/*, arrays*/) {
|
||||
var len = arguments.length;
|
||||
var idx = 0;
|
||||
while (++idx < len) {
|
||||
arr = diffArray(arr, arguments[idx]);
|
||||
}
|
||||
return arr;
|
||||
};
|
||||
|
||||
function diffArray(one, two) {
|
||||
if (!Array.isArray(two)) {
|
||||
return one.slice();
|
||||
}
|
||||
|
||||
var tlen = two.length
|
||||
var olen = one.length;
|
||||
var idx = -1;
|
||||
var arr = [];
|
||||
|
||||
while (++idx < olen) {
|
||||
var ele = one[idx];
|
||||
|
||||
var hasEle = false;
|
||||
for (var i = 0; i < tlen; i++) {
|
||||
var val = two[i];
|
||||
|
||||
if (ele === val) {
|
||||
hasEle = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (hasEle === false) {
|
||||
arr.push(ele);
|
||||
}
|
||||
}
|
||||
return arr;
|
||||
}
|
109
node_modules/arr-diff/package.json
generated
vendored
Normal file
109
node_modules/arr-diff/package.json
generated
vendored
Normal file
@ -0,0 +1,109 @@
|
||||
{
|
||||
"_from": "arr-diff@^4.0.0",
|
||||
"_id": "arr-diff@4.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=",
|
||||
"_location": "/arr-diff",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "arr-diff@^4.0.0",
|
||||
"name": "arr-diff",
|
||||
"escapedName": "arr-diff",
|
||||
"rawSpec": "^4.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^4.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/micromatch",
|
||||
"/nanomatch"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
|
||||
"_shasum": "d6461074febfec71e7e15235761a329a5dc7c520",
|
||||
"_spec": "arr-diff@^4.0.0",
|
||||
"_where": "/Users/evanm/src/zebraPrinter/ZebraPrinter/node_modules/micromatch",
|
||||
"author": {
|
||||
"name": "Jon Schlinkert",
|
||||
"url": "https://github.com/jonschlinkert"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/arr-diff/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Jon Schlinkert",
|
||||
"email": "jon.schlinkert@sellside.com",
|
||||
"url": "http://twitter.com/jonschlinkert"
|
||||
},
|
||||
{
|
||||
"name": "Paul Miller",
|
||||
"email": "paul+gh@paulmillr.com",
|
||||
"url": "paulmillr.com"
|
||||
}
|
||||
],
|
||||
"dependencies": {},
|
||||
"deprecated": false,
|
||||
"description": "Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.",
|
||||
"devDependencies": {
|
||||
"ansi-bold": "^0.1.1",
|
||||
"arr-flatten": "^1.0.1",
|
||||
"array-differ": "^1.0.0",
|
||||
"benchmarked": "^0.2.4",
|
||||
"gulp-format-md": "^0.1.9",
|
||||
"minimist": "^1.2.0",
|
||||
"mocha": "^2.4.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/jonschlinkert/arr-diff",
|
||||
"keywords": [
|
||||
"arr",
|
||||
"array",
|
||||
"array differ",
|
||||
"array-differ",
|
||||
"diff",
|
||||
"differ",
|
||||
"difference"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "arr-diff",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/jonschlinkert/arr-diff.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"verb": {
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"arr-flatten",
|
||||
"array-filter",
|
||||
"array-intersection"
|
||||
]
|
||||
},
|
||||
"reflinks": [
|
||||
"array-differ",
|
||||
"verb"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
},
|
||||
"version": "4.0.0"
|
||||
}
|
21
node_modules/arr-flatten/LICENSE
generated
vendored
Executable file
21
node_modules/arr-flatten/LICENSE
generated
vendored
Executable 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.
|
86
node_modules/arr-flatten/README.md
generated
vendored
Executable file
86
node_modules/arr-flatten/README.md
generated
vendored
Executable file
@ -0,0 +1,86 @@
|
||||
# arr-flatten [](https://www.npmjs.com/package/arr-flatten) [](https://npmjs.org/package/arr-flatten) [](https://npmjs.org/package/arr-flatten) [](https://travis-ci.org/jonschlinkert/arr-flatten) [](https://ci.appveyor.com/project/jonschlinkert/arr-flatten)
|
||||
|
||||
> Recursively flatten an array or arrays.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install --save arr-flatten
|
||||
```
|
||||
|
||||
## Install
|
||||
|
||||
Install with [bower](https://bower.io/)
|
||||
|
||||
```sh
|
||||
$ bower install arr-flatten --save
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var flatten = require('arr-flatten');
|
||||
|
||||
flatten(['a', ['b', ['c']], 'd', ['e']]);
|
||||
//=> ['a', 'b', 'c', 'd', 'e']
|
||||
```
|
||||
|
||||
## Why another flatten utility?
|
||||
|
||||
I wanted the fastest implementation I could find, with implementation choices that should work for 95% of use cases, but no cruft to cover the other 5%.
|
||||
|
||||
## About
|
||||
|
||||
### Related projects
|
||||
|
||||
* [arr-filter](https://www.npmjs.com/package/arr-filter): Faster alternative to javascript's native filter method. | [homepage](https://github.com/jonschlinkert/arr-filter "Faster alternative to javascript's native filter method.")
|
||||
* [arr-union](https://www.npmjs.com/package/arr-union): Combines a list of arrays, returning a single array with unique values, using strict equality… [more](https://github.com/jonschlinkert/arr-union) | [homepage](https://github.com/jonschlinkert/arr-union "Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.")
|
||||
* [array-each](https://www.npmjs.com/package/array-each): Loop over each item in an array and call the given function on every element. | [homepage](https://github.com/jonschlinkert/array-each "Loop over each item in an array and call the given function on every element.")
|
||||
* [array-unique](https://www.npmjs.com/package/array-unique): Remove duplicate values from an array. Fastest ES5 implementation. | [homepage](https://github.com/jonschlinkert/array-unique "Remove duplicate values from an array. Fastest ES5 implementation.")
|
||||
|
||||
### Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
||||
|
||||
### Contributors
|
||||
|
||||
| **Commits** | **Contributor** |
|
||||
| --- | --- |
|
||||
| 20 | [jonschlinkert](https://github.com/jonschlinkert) |
|
||||
| 1 | [lukeed](https://github.com/lukeed) |
|
||||
|
||||
### 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 05, 2017._
|
22
node_modules/arr-flatten/index.js
generated
vendored
Normal file
22
node_modules/arr-flatten/index.js
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/*!
|
||||
* arr-flatten <https://github.com/jonschlinkert/arr-flatten>
|
||||
*
|
||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = function (arr) {
|
||||
return flat(arr, []);
|
||||
};
|
||||
|
||||
function flat(arr, res) {
|
||||
var i = 0, cur;
|
||||
var len = arr.length;
|
||||
for (; i < len; i++) {
|
||||
cur = arr[i];
|
||||
Array.isArray(cur) ? flat(cur, res) : res.push(cur);
|
||||
}
|
||||
return res;
|
||||
}
|
113
node_modules/arr-flatten/package.json
generated
vendored
Normal file
113
node_modules/arr-flatten/package.json
generated
vendored
Normal file
@ -0,0 +1,113 @@
|
||||
{
|
||||
"_from": "arr-flatten@^1.1.0",
|
||||
"_id": "arr-flatten@1.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==",
|
||||
"_location": "/arr-flatten",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "arr-flatten@^1.1.0",
|
||||
"name": "arr-flatten",
|
||||
"escapedName": "arr-flatten",
|
||||
"rawSpec": "^1.1.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.1.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/braces"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
|
||||
"_shasum": "36048bbff4e7b47e136644316c99669ea5ae91f1",
|
||||
"_spec": "arr-flatten@^1.1.0",
|
||||
"_where": "/Users/evanm/src/zebraPrinter/ZebraPrinter/node_modules/braces",
|
||||
"author": {
|
||||
"name": "Jon Schlinkert",
|
||||
"url": "https://github.com/jonschlinkert"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/arr-flatten/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Jon Schlinkert",
|
||||
"url": "http://twitter.com/jonschlinkert"
|
||||
},
|
||||
{
|
||||
"name": "Luke Edwards",
|
||||
"url": "https://lukeed.com"
|
||||
}
|
||||
],
|
||||
"deprecated": false,
|
||||
"description": "Recursively flatten an array or arrays.",
|
||||
"devDependencies": {
|
||||
"ansi-bold": "^0.1.1",
|
||||
"array-flatten": "^2.1.1",
|
||||
"array-slice": "^1.0.0",
|
||||
"benchmarked": "^1.0.0",
|
||||
"compute-flatten": "^1.0.0",
|
||||
"flatit": "^1.1.1",
|
||||
"flatten": "^1.0.2",
|
||||
"flatten-array": "^1.0.0",
|
||||
"glob": "^7.1.1",
|
||||
"gulp-format-md": "^0.1.12",
|
||||
"just-flatten-it": "^1.1.23",
|
||||
"lodash.flattendeep": "^4.4.0",
|
||||
"m_flattened": "^1.0.1",
|
||||
"mocha": "^3.2.0",
|
||||
"utils-flatten": "^1.0.0",
|
||||
"write": "^0.3.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/jonschlinkert/arr-flatten",
|
||||
"keywords": [
|
||||
"arr",
|
||||
"array",
|
||||
"elements",
|
||||
"flat",
|
||||
"flatten",
|
||||
"nested",
|
||||
"recurse",
|
||||
"recursive",
|
||||
"recursively"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "arr-flatten",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/jonschlinkert/arr-flatten.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"verb": {
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"arr-filter",
|
||||
"arr-union",
|
||||
"array-each",
|
||||
"array-unique"
|
||||
]
|
||||
},
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
},
|
||||
"version": "1.1.0"
|
||||
}
|
21
node_modules/arr-union/LICENSE
generated
vendored
Normal file
21
node_modules/arr-union/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2016, Jon Schlinkert.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
99
node_modules/arr-union/README.md
generated
vendored
Normal file
99
node_modules/arr-union/README.md
generated
vendored
Normal file
@ -0,0 +1,99 @@
|
||||
# arr-union [](https://www.npmjs.com/package/arr-union) [](https://travis-ci.org/jonschlinkert/arr-union)
|
||||
|
||||
> Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm i arr-union --save
|
||||
```
|
||||
|
||||
## Benchmarks
|
||||
|
||||
This library is **10-20 times faster** and more performant than [array-union](https://github.com/sindresorhus/array-union).
|
||||
|
||||
See the [benchmarks](./benchmark).
|
||||
|
||||
```sh
|
||||
#1: five-arrays
|
||||
array-union x 511,121 ops/sec ±0.80% (96 runs sampled)
|
||||
arr-union x 5,716,039 ops/sec ±0.86% (93 runs sampled)
|
||||
|
||||
#2: ten-arrays
|
||||
array-union x 245,196 ops/sec ±0.69% (94 runs sampled)
|
||||
arr-union x 1,850,786 ops/sec ±0.84% (97 runs sampled)
|
||||
|
||||
#3: two-arrays
|
||||
array-union x 563,869 ops/sec ±0.97% (94 runs sampled)
|
||||
arr-union x 9,602,852 ops/sec ±0.87% (92 runs sampled)
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var union = require('arr-union');
|
||||
|
||||
union(['a'], ['b', 'c'], ['d', 'e', 'f']);
|
||||
//=> ['a', 'b', 'c', 'd', 'e', 'f']
|
||||
```
|
||||
|
||||
Returns only unique elements:
|
||||
|
||||
```js
|
||||
union(['a', 'a'], ['b', 'c']);
|
||||
//=> ['a', 'b', 'c']
|
||||
```
|
||||
|
||||
## Related projects
|
||||
|
||||
* [arr-diff](https://www.npmjs.com/package/arr-diff): Returns an array with only the unique values from the first array, by excluding all… [more](https://www.npmjs.com/package/arr-diff) | [homepage](https://github.com/jonschlinkert/arr-diff)
|
||||
* [arr-filter](https://www.npmjs.com/package/arr-filter): Faster alternative to javascript's native filter method. | [homepage](https://github.com/jonschlinkert/arr-filter)
|
||||
* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten)
|
||||
* [arr-map](https://www.npmjs.com/package/arr-map): Faster, node.js focused alternative to JavaScript's native array map. | [homepage](https://github.com/jonschlinkert/arr-map)
|
||||
* [arr-pluck](https://www.npmjs.com/package/arr-pluck): Retrieves the value of a specified property from all elements in the collection. | [homepage](https://github.com/jonschlinkert/arr-pluck)
|
||||
* [arr-reduce](https://www.npmjs.com/package/arr-reduce): Fast array reduce that also loops over sparse elements. | [homepage](https://github.com/jonschlinkert/arr-reduce)
|
||||
* [array-unique](https://www.npmjs.com/package/array-unique): Return an array free of duplicate values. Fastest ES5 implementation. | [homepage](https://github.com/jonschlinkert/array-unique)
|
||||
|
||||
## Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/arr-union/issues/new).
|
||||
|
||||
## Building docs
|
||||
|
||||
Generate readme and API documentation with [verb](https://github.com/verbose/verb):
|
||||
|
||||
```sh
|
||||
$ npm i verb && npm run docs
|
||||
```
|
||||
|
||||
Or, if [verb](https://github.com/verbose/verb) is installed globally:
|
||||
|
||||
```sh
|
||||
$ verb
|
||||
```
|
||||
|
||||
## Running tests
|
||||
|
||||
Install dev dependencies:
|
||||
|
||||
```sh
|
||||
$ npm i -d && npm test
|
||||
```
|
||||
|
||||
## Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
|
||||
|
||||
## License
|
||||
|
||||
Copyright © 2016 [Jon Schlinkert](https://github.com/jonschlinkert)
|
||||
Released under the [MIT license](https://github.com/jonschlinkert/arr-union/blob/master/LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on February 23, 2016._
|
29
node_modules/arr-union/index.js
generated
vendored
Normal file
29
node_modules/arr-union/index.js
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function union(init) {
|
||||
if (!Array.isArray(init)) {
|
||||
throw new TypeError('arr-union expects the first argument to be an array.');
|
||||
}
|
||||
|
||||
var len = arguments.length;
|
||||
var i = 0;
|
||||
|
||||
while (++i < len) {
|
||||
var arg = arguments[i];
|
||||
if (!arg) continue;
|
||||
|
||||
if (!Array.isArray(arg)) {
|
||||
arg = [arg];
|
||||
}
|
||||
|
||||
for (var j = 0; j < arg.length; j++) {
|
||||
var ele = arg[j];
|
||||
|
||||
if (init.indexOf(ele) >= 0) {
|
||||
continue;
|
||||
}
|
||||
init.push(ele);
|
||||
}
|
||||
}
|
||||
return init;
|
||||
};
|
108
node_modules/arr-union/package.json
generated
vendored
Normal file
108
node_modules/arr-union/package.json
generated
vendored
Normal file
@ -0,0 +1,108 @@
|
||||
{
|
||||
"_from": "arr-union@^3.1.0",
|
||||
"_id": "arr-union@3.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
|
||||
"_location": "/arr-union",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "arr-union@^3.1.0",
|
||||
"name": "arr-union",
|
||||
"escapedName": "arr-union",
|
||||
"rawSpec": "^3.1.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^3.1.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/class-utils",
|
||||
"/union-value"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
|
||||
"_shasum": "e39b09aea9def866a8f206e288af63919bae39c4",
|
||||
"_spec": "arr-union@^3.1.0",
|
||||
"_where": "/Users/evanm/src/zebraPrinter/ZebraPrinter/node_modules/union-value",
|
||||
"author": {
|
||||
"name": "Jon Schlinkert",
|
||||
"url": "https://github.com/jonschlinkert"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/arr-union/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.",
|
||||
"devDependencies": {
|
||||
"ansi-bold": "^0.1.1",
|
||||
"array-union": "^1.0.1",
|
||||
"array-unique": "^0.2.1",
|
||||
"benchmarked": "^0.1.4",
|
||||
"gulp-format-md": "^0.1.7",
|
||||
"minimist": "^1.1.1",
|
||||
"mocha": "*",
|
||||
"should": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/jonschlinkert/arr-union",
|
||||
"keywords": [
|
||||
"add",
|
||||
"append",
|
||||
"array",
|
||||
"arrays",
|
||||
"combine",
|
||||
"concat",
|
||||
"extend",
|
||||
"union",
|
||||
"uniq",
|
||||
"unique",
|
||||
"util",
|
||||
"utility",
|
||||
"utils"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "arr-union",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/jonschlinkert/arr-union.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"verb": {
|
||||
"run": true,
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"arr-diff",
|
||||
"arr-flatten",
|
||||
"arr-filter",
|
||||
"arr-map",
|
||||
"arr-pluck",
|
||||
"arr-reduce",
|
||||
"array-unique"
|
||||
]
|
||||
},
|
||||
"reflinks": [
|
||||
"verb",
|
||||
"array-union"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
},
|
||||
"version": "3.1.0"
|
||||
}
|
7
node_modules/array-differ/index.js
generated
vendored
Normal file
7
node_modules/array-differ/index.js
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
module.exports = function (arr) {
|
||||
var rest = [].concat.apply([], [].slice.call(arguments, 1));
|
||||
return arr.filter(function (el) {
|
||||
return rest.indexOf(el) === -1;
|
||||
});
|
||||
};
|
64
node_modules/array-differ/package.json
generated
vendored
Normal file
64
node_modules/array-differ/package.json
generated
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
{
|
||||
"_from": "array-differ@^1.0.0",
|
||||
"_id": "array-differ@1.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=",
|
||||
"_location": "/array-differ",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "array-differ@^1.0.0",
|
||||
"name": "array-differ",
|
||||
"escapedName": "array-differ",
|
||||
"rawSpec": "^1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/gulp-util"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz",
|
||||
"_shasum": "eff52e3758249d33be402b8bb8e564bb2b5d4031",
|
||||
"_spec": "array-differ@^1.0.0",
|
||||
"_where": "/Users/evanm/src/zebraPrinter/ZebraPrinter/node_modules/gulp-util",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "http://sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/array-differ/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Create an array with values that are present in the first input array but not additional ones",
|
||||
"devDependencies": {
|
||||
"mocha": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/array-differ#readme",
|
||||
"keywords": [
|
||||
"array",
|
||||
"difference",
|
||||
"diff",
|
||||
"differ",
|
||||
"filter",
|
||||
"exclude"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "array-differ",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/array-differ.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "1.0.0"
|
||||
}
|
41
node_modules/array-differ/readme.md
generated
vendored
Normal file
41
node_modules/array-differ/readme.md
generated
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
# array-differ [](https://travis-ci.org/sindresorhus/array-differ)
|
||||
|
||||
> Create an array with values that are present in the first input array but not additional ones
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ npm install --save array-differ
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var arrayDiffer = require('array-differ');
|
||||
|
||||
arrayDiffer([2, 3, 4], [3, 50]);
|
||||
//=> [2, 4]
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### arrayDiffer(input, values, [values, ...])
|
||||
|
||||
Returns the new array.
|
||||
|
||||
#### input
|
||||
|
||||
Type: `array`
|
||||
|
||||
#### values
|
||||
|
||||
Type: `array`
|
||||
|
||||
Arrays of values to exclude.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
21
node_modules/array-each/LICENSE
generated
vendored
Normal file
21
node_modules/array-each/LICENSE
generated
vendored
Normal 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.
|
84
node_modules/array-each/README.md
generated
vendored
Normal file
84
node_modules/array-each/README.md
generated
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
# array-each [](https://www.npmjs.com/package/array-each) [](https://npmjs.org/package/array-each) [](https://npmjs.org/package/array-each) [](https://travis-ci.org/jonschlinkert/array-each)
|
||||
|
||||
> Loop over each item in an array and call the given function on every element.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install --save array-each
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### [each](index.js#L34)
|
||||
|
||||
Loop over each item in an array and call the given function on every element.
|
||||
|
||||
**Params**
|
||||
|
||||
* `array` **{Array}**
|
||||
* `fn` **{Function}**
|
||||
* `thisArg` **{Object}**: (optional) pass a `thisArg` to be used as the context in which to call the function.
|
||||
* `returns` **{undefined}**
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
each(['a', 'b', 'c'], function(ele) {
|
||||
return ele + ele;
|
||||
});
|
||||
//=> ['aa', 'bb', 'cc']
|
||||
|
||||
each(['a', 'b', 'c'], function(ele, i) {
|
||||
return i + ele;
|
||||
});
|
||||
//=> ['0a', '1b', '2c']
|
||||
```
|
||||
|
||||
## About
|
||||
|
||||
### Related projects
|
||||
|
||||
* [arr-filter](https://www.npmjs.com/package/arr-filter): Faster alternative to javascript's native filter method. | [homepage](https://github.com/jonschlinkert/arr-filter "Faster alternative to javascript's native filter method.")
|
||||
* [arr-map](https://www.npmjs.com/package/arr-map): Faster, node.js focused alternative to JavaScript's native array map. | [homepage](https://github.com/jonschlinkert/arr-map "Faster, node.js focused alternative to JavaScript's native array map.")
|
||||
* [collection-map](https://www.npmjs.com/package/collection-map): Returns an array of mapped values from an array or object. | [homepage](https://github.com/jonschlinkert/collection-map "Returns an array of mapped values from an array or object.")
|
||||
|
||||
### 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.4.2, on February 26, 2017._
|
46
node_modules/array-each/index.js
generated
vendored
Normal file
46
node_modules/array-each/index.js
generated
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
/*!
|
||||
* array-each <https://github.com/jonschlinkert/array-each>
|
||||
*
|
||||
* Copyright (c) 2015, 2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Loop over each item in an array and call the given function on every element.
|
||||
*
|
||||
* ```js
|
||||
* each(['a', 'b', 'c'], function(ele) {
|
||||
* return ele + ele;
|
||||
* });
|
||||
* //=> ['aa', 'bb', 'cc']
|
||||
*
|
||||
* each(['a', 'b', 'c'], function(ele, i) {
|
||||
* return i + ele;
|
||||
* });
|
||||
* //=> ['0a', '1b', '2c']
|
||||
* ```
|
||||
*
|
||||
* @name each
|
||||
* @alias forEach
|
||||
* @param {Array} `array`
|
||||
* @param {Function} `fn`
|
||||
* @param {Object} `thisArg` (optional) pass a `thisArg` to be used as the context in which to call the function.
|
||||
* @return {undefined}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
module.exports = function each(arr, cb, thisArg) {
|
||||
if (arr == null) return;
|
||||
|
||||
var len = arr.length;
|
||||
var idx = -1;
|
||||
|
||||
while (++idx < len) {
|
||||
var ele = arr[idx];
|
||||
if (cb.call(thisArg, ele, idx, arr) === false) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
81
node_modules/array-each/package.json
generated
vendored
Normal file
81
node_modules/array-each/package.json
generated
vendored
Normal file
@ -0,0 +1,81 @@
|
||||
{
|
||||
"_from": "array-each@^1.0.1",
|
||||
"_id": "array-each@1.0.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=",
|
||||
"_location": "/array-each",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "array-each@^1.0.1",
|
||||
"name": "array-each",
|
||||
"escapedName": "array-each",
|
||||
"rawSpec": "^1.0.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/object.defaults"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz",
|
||||
"_shasum": "a794af0c05ab1752846ee753a1f211a05ba0c44f",
|
||||
"_spec": "array-each@^1.0.1",
|
||||
"_where": "/Users/evanm/src/zebraPrinter/ZebraPrinter/node_modules/object.defaults",
|
||||
"author": {
|
||||
"name": "Jon Schlinkert",
|
||||
"url": "https://github.com/jonschlinkert"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/array-each/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Loop over each item in an array and call the given function on every element.",
|
||||
"devDependencies": {
|
||||
"gulp-format-md": "^0.1.11",
|
||||
"mocha": "^3.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/jonschlinkert/array-each",
|
||||
"keywords": [
|
||||
"array",
|
||||
"each"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "array-each",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/jonschlinkert/array-each.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"verb": {
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"collection-map",
|
||||
"arr-filter",
|
||||
"arr-map"
|
||||
]
|
||||
},
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
},
|
||||
"version": "1.0.1"
|
||||
}
|
21
node_modules/array-slice/LICENSE
generated
vendored
Executable file
21
node_modules/array-slice/LICENSE
generated
vendored
Executable 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.
|
82
node_modules/array-slice/README.md
generated
vendored
Executable file
82
node_modules/array-slice/README.md
generated
vendored
Executable file
@ -0,0 +1,82 @@
|
||||
# array-slice [](https://www.npmjs.com/package/array-slice) [](https://npmjs.org/package/array-slice) [](https://npmjs.org/package/array-slice) [](https://travis-ci.org/jonschlinkert/array-slice)
|
||||
|
||||
> Array-slice method. Slices `array` from the `start` index up to, but not including, the `end` index.
|
||||
|
||||
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 array-slice
|
||||
```
|
||||
|
||||
This function is used instead of `Array#slice` to support node lists in IE < 9 and to ensure dense arrays are returned. This is also faster than native slice in some cases.
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var slice = require('array-slice');
|
||||
var arr = ['a', 'b', 'd', 'e', 'f', 'g', 'h', 'i', 'j'];
|
||||
|
||||
slice(arr, 3, 6);
|
||||
//=> ['e', 'f', 'g']
|
||||
```
|
||||
|
||||
## 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:
|
||||
|
||||
* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays.")
|
||||
* [array-unique](https://www.npmjs.com/package/array-unique): Remove duplicate values from an array. Fastest ES5 implementation. | [homepage](https://github.com/jonschlinkert/array-unique "Remove duplicate values from an array. Fastest ES5 implementation.")
|
||||
* [array-xor](https://www.npmjs.com/package/array-xor): Returns the symmetric difference (exclusive-or) of an array of elements (elements that are present in… [more](https://github.com/jonschlinkert/array-xor) | [homepage](https://github.com/jonschlinkert/array-xor "Returns the symmetric difference (exclusive-or) of an array of elements (elements that are present in all given arrays and not in their intersections).")
|
||||
|
||||
### 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 30, 2017._
|
33
node_modules/array-slice/index.js
generated
vendored
Normal file
33
node_modules/array-slice/index.js
generated
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
/*!
|
||||
* array-slice <https://github.com/jonschlinkert/array-slice>
|
||||
*
|
||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = function slice(arr, start, end) {
|
||||
var len = arr.length;
|
||||
var range = [];
|
||||
|
||||
start = idx(len, start);
|
||||
end = idx(len, end, len);
|
||||
|
||||
while (start < end) {
|
||||
range.push(arr[start++]);
|
||||
}
|
||||
return range;
|
||||
};
|
||||
|
||||
function idx(len, pos, end) {
|
||||
if (pos == null) {
|
||||
pos = end || 0;
|
||||
} else if (pos < 0) {
|
||||
pos = Math.max(len + pos, 0);
|
||||
} else {
|
||||
pos = Math.min(pos, len);
|
||||
}
|
||||
|
||||
return pos;
|
||||
}
|
85
node_modules/array-slice/package.json
generated
vendored
Normal file
85
node_modules/array-slice/package.json
generated
vendored
Normal file
@ -0,0 +1,85 @@
|
||||
{
|
||||
"_from": "array-slice@^1.0.0",
|
||||
"_id": "array-slice@1.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==",
|
||||
"_location": "/array-slice",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "array-slice@^1.0.0",
|
||||
"name": "array-slice",
|
||||
"escapedName": "array-slice",
|
||||
"rawSpec": "^1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/object.defaults"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz",
|
||||
"_shasum": "e368ea15f89bc7069f7ffb89aec3a6c7d4ac22d4",
|
||||
"_spec": "array-slice@^1.0.0",
|
||||
"_where": "/Users/evanm/src/zebraPrinter/ZebraPrinter/node_modules/object.defaults",
|
||||
"author": {
|
||||
"name": "Jon Schlinkert",
|
||||
"url": "https://github.com/jonschlinkert"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/array-slice/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Array-slice method. Slices `array` from the `start` index up to, but not including, the `end` index.",
|
||||
"devDependencies": {
|
||||
"gulp-format-md": "^1.0.0",
|
||||
"mocha": "^3.5.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/jonschlinkert/array-slice",
|
||||
"keywords": [
|
||||
"array",
|
||||
"javascript",
|
||||
"js",
|
||||
"slice",
|
||||
"util",
|
||||
"utils"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "array-slice",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/jonschlinkert/array-slice.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"verb": {
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"arr-flatten",
|
||||
"array-unique",
|
||||
"array-xor"
|
||||
]
|
||||
},
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
},
|
||||
"version": "1.1.0"
|
||||
}
|
62
node_modules/array-uniq/index.js
generated
vendored
Normal file
62
node_modules/array-uniq/index.js
generated
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
'use strict';
|
||||
|
||||
// there's 3 implementations written in increasing order of efficiency
|
||||
|
||||
// 1 - no Set type is defined
|
||||
function uniqNoSet(arr) {
|
||||
var ret = [];
|
||||
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (ret.indexOf(arr[i]) === -1) {
|
||||
ret.push(arr[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
// 2 - a simple Set type is defined
|
||||
function uniqSet(arr) {
|
||||
var seen = new Set();
|
||||
return arr.filter(function (el) {
|
||||
if (!seen.has(el)) {
|
||||
seen.add(el);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
// 3 - a standard Set type is defined and it has a forEach method
|
||||
function uniqSetWithForEach(arr) {
|
||||
var ret = [];
|
||||
|
||||
(new Set(arr)).forEach(function (el) {
|
||||
ret.push(el);
|
||||
});
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
// V8 currently has a broken implementation
|
||||
// https://github.com/joyent/node/issues/8449
|
||||
function doesForEachActuallyWork() {
|
||||
var ret = false;
|
||||
|
||||
(new Set([true])).forEach(function (el) {
|
||||
ret = el;
|
||||
});
|
||||
|
||||
return ret === true;
|
||||
}
|
||||
|
||||
if ('Set' in global) {
|
||||
if (typeof Set.prototype.forEach === 'function' && doesForEachActuallyWork()) {
|
||||
module.exports = uniqSetWithForEach;
|
||||
} else {
|
||||
module.exports = uniqSet;
|
||||
}
|
||||
} else {
|
||||
module.exports = uniqNoSet;
|
||||
}
|
21
node_modules/array-uniq/license
generated
vendored
Normal file
21
node_modules/array-uniq/license
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
69
node_modules/array-uniq/package.json
generated
vendored
Normal file
69
node_modules/array-uniq/package.json
generated
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
{
|
||||
"_from": "array-uniq@^1.0.2",
|
||||
"_id": "array-uniq@1.0.3",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=",
|
||||
"_location": "/array-uniq",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "array-uniq@^1.0.2",
|
||||
"name": "array-uniq",
|
||||
"escapedName": "array-uniq",
|
||||
"rawSpec": "^1.0.2",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.2"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/gulp-util"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
|
||||
"_shasum": "af6ac877a25cc7f74e058894753858dfdb24fdb6",
|
||||
"_spec": "array-uniq@^1.0.2",
|
||||
"_where": "/Users/evanm/src/zebraPrinter/ZebraPrinter/node_modules/gulp-util",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/array-uniq/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Create an array without duplicates",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"es6-set": "^0.1.0",
|
||||
"require-uncached": "^1.0.2",
|
||||
"xo": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/array-uniq#readme",
|
||||
"keywords": [
|
||||
"array",
|
||||
"arr",
|
||||
"set",
|
||||
"uniq",
|
||||
"unique",
|
||||
"es6",
|
||||
"duplicate",
|
||||
"remove"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "array-uniq",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/array-uniq.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "1.0.3"
|
||||
}
|
30
node_modules/array-uniq/readme.md
generated
vendored
Normal file
30
node_modules/array-uniq/readme.md
generated
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
# array-uniq [](https://travis-ci.org/sindresorhus/array-uniq)
|
||||
|
||||
> Create an array without duplicates
|
||||
|
||||
It's already pretty fast, but will be much faster when [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) becomes available in V8 (especially with large arrays).
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save array-uniq
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const arrayUniq = require('array-uniq');
|
||||
|
||||
arrayUniq([1, 1, 2, 3, 3]);
|
||||
//=> [1, 2, 3]
|
||||
|
||||
arrayUniq(['foo', 'foo', 'bar', 'foo']);
|
||||
//=> ['foo', 'bar']
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
21
node_modules/array-unique/LICENSE
generated
vendored
Executable file
21
node_modules/array-unique/LICENSE
generated
vendored
Executable file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2016, Jon Schlinkert
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
77
node_modules/array-unique/README.md
generated
vendored
Executable file
77
node_modules/array-unique/README.md
generated
vendored
Executable file
@ -0,0 +1,77 @@
|
||||
# array-unique [](https://www.npmjs.com/package/array-unique) [](https://npmjs.org/package/array-unique) [](https://travis-ci.org/jonschlinkert/array-unique)
|
||||
|
||||
Remove duplicate values from an array. Fastest ES5 implementation.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install --save array-unique
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var unique = require('array-unique');
|
||||
|
||||
var arr = ['a', 'b', 'c', 'c'];
|
||||
console.log(unique(arr)) //=> ['a', 'b', 'c']
|
||||
console.log(arr) //=> ['a', 'b', 'c']
|
||||
|
||||
/* The above modifies the input array. To prevent that at a slight performance cost: */
|
||||
var unique = require("array-unique").immutable;
|
||||
|
||||
var arr = ['a', 'b', 'c', 'c'];
|
||||
console.log(unique(arr)) //=> ['a', 'b', 'c']
|
||||
console.log(arr) //=> ['a', 'b', 'c', 'c']
|
||||
```
|
||||
|
||||
## About
|
||||
|
||||
### Related projects
|
||||
|
||||
* [arr-diff](https://www.npmjs.com/package/arr-diff): Returns an array with only the unique values from the first array, by excluding all… [more](https://github.com/jonschlinkert/arr-diff) | [homepage](https://github.com/jonschlinkert/arr-diff "Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.")
|
||||
* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.")
|
||||
* [arr-map](https://www.npmjs.com/package/arr-map): Faster, node.js focused alternative to JavaScript's native array map. | [homepage](https://github.com/jonschlinkert/arr-map "Faster, node.js focused alternative to JavaScript's native array map.")
|
||||
* [arr-pluck](https://www.npmjs.com/package/arr-pluck): Retrieves the value of a specified property from all elements in the collection. | [homepage](https://github.com/jonschlinkert/arr-pluck "Retrieves the value of a specified property from all elements in the collection.")
|
||||
* [arr-reduce](https://www.npmjs.com/package/arr-reduce): Fast array reduce that also loops over sparse elements. | [homepage](https://github.com/jonschlinkert/arr-reduce "Fast array reduce that also loops over sparse elements.")
|
||||
* [arr-union](https://www.npmjs.com/package/arr-union): Combines a list of arrays, returning a single array with unique values, using strict equality… [more](https://github.com/jonschlinkert/arr-union) | [homepage](https://github.com/jonschlinkert/arr-union "Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.")
|
||||
|
||||
### Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
||||
|
||||
### Building docs
|
||||
|
||||
_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
|
||||
|
||||
To generate the readme and API documentation with [verb](https://github.com/verbose/verb):
|
||||
|
||||
```sh
|
||||
$ npm install -g verb verb-generate-readme && verb
|
||||
```
|
||||
|
||||
### Running tests
|
||||
|
||||
Install dev dependencies:
|
||||
|
||||
```sh
|
||||
$ npm install -d && npm test
|
||||
```
|
||||
|
||||
### Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
|
||||
|
||||
### License
|
||||
|
||||
Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT license](https://github.com/jonschlinkert/array-unique/blob/master/LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.28, on July 31, 2016._
|
43
node_modules/array-unique/index.js
generated
vendored
Normal file
43
node_modules/array-unique/index.js
generated
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
/*!
|
||||
* array-unique <https://github.com/jonschlinkert/array-unique>
|
||||
*
|
||||
* Copyright (c) 2014-2015, Jon Schlinkert.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = function unique(arr) {
|
||||
if (!Array.isArray(arr)) {
|
||||
throw new TypeError('array-unique expects an array.');
|
||||
}
|
||||
|
||||
var len = arr.length;
|
||||
var i = -1;
|
||||
|
||||
while (i++ < len) {
|
||||
var j = i + 1;
|
||||
|
||||
for (; j < arr.length; ++j) {
|
||||
if (arr[i] === arr[j]) {
|
||||
arr.splice(j--, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return arr;
|
||||
};
|
||||
|
||||
module.exports.immutable = function uniqueImmutable(arr) {
|
||||
if (!Array.isArray(arr)) {
|
||||
throw new TypeError('array-unique expects an array.');
|
||||
}
|
||||
|
||||
var arrLen = arr.length;
|
||||
var newArr = new Array(arrLen);
|
||||
|
||||
for (var i = 0; i < arrLen; i++) {
|
||||
newArr[i] = arr[i];
|
||||
}
|
||||
|
||||
return module.exports(newArr);
|
||||
};
|
96
node_modules/array-unique/package.json
generated
vendored
Normal file
96
node_modules/array-unique/package.json
generated
vendored
Normal file
@ -0,0 +1,96 @@
|
||||
{
|
||||
"_from": "array-unique@^0.3.2",
|
||||
"_id": "array-unique@0.3.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
|
||||
"_location": "/array-unique",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "array-unique@^0.3.2",
|
||||
"name": "array-unique",
|
||||
"escapedName": "array-unique",
|
||||
"rawSpec": "^0.3.2",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^0.3.2"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/braces",
|
||||
"/extglob",
|
||||
"/micromatch",
|
||||
"/nanomatch"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
|
||||
"_shasum": "a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428",
|
||||
"_spec": "array-unique@^0.3.2",
|
||||
"_where": "/Users/evanm/src/zebraPrinter/ZebraPrinter/node_modules/micromatch",
|
||||
"author": {
|
||||
"name": "Jon Schlinkert",
|
||||
"url": "https://github.com/jonschlinkert"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/array-unique/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Remove duplicate values from an array. Fastest ES5 implementation.",
|
||||
"devDependencies": {
|
||||
"array-uniq": "^1.0.2",
|
||||
"benchmarked": "^0.1.3",
|
||||
"gulp-format-md": "^0.1.9",
|
||||
"mocha": "^2.5.3",
|
||||
"should": "^10.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"LICENSE",
|
||||
"README.md"
|
||||
],
|
||||
"homepage": "https://github.com/jonschlinkert/array-unique",
|
||||
"keywords": [
|
||||
"array",
|
||||
"unique"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "array-unique",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/jonschlinkert/array-unique.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"verb": {
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"arr-diff",
|
||||
"arr-union",
|
||||
"arr-flatten",
|
||||
"arr-reduce",
|
||||
"arr-map",
|
||||
"arr-pluck"
|
||||
]
|
||||
},
|
||||
"reflinks": [
|
||||
"verb",
|
||||
"verb-generate-readme"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
},
|
||||
"version": "0.3.2"
|
||||
}
|
21
node_modules/assign-symbols/LICENSE
generated
vendored
Normal file
21
node_modules/assign-symbols/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015, 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.
|
73
node_modules/assign-symbols/README.md
generated
vendored
Normal file
73
node_modules/assign-symbols/README.md
generated
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
# assign-symbols [](http://badge.fury.io/js/assign-symbols)
|
||||
|
||||
> Assign the enumerable es6 Symbol properties from an object (or objects) to the first object passed on the arguments. Can be used as a supplement to other extend, assign or merge methods as a polyfill for the Symbols part of the es6 Object.assign method.
|
||||
|
||||
From the [Mozilla Developer docs for Symbol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol):
|
||||
|
||||
> A symbol is a unique and immutable data type and may be used as an identifier for object properties. The symbol object is an implicit object wrapper for the symbol primitive data type.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/)
|
||||
|
||||
```sh
|
||||
$ npm i assign-symbols --save
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var assignSymbols = require('assign-symbols');
|
||||
var obj = {};
|
||||
|
||||
var one = {};
|
||||
var symbolOne = Symbol('aaa');
|
||||
one[symbolOne] = 'bbb';
|
||||
|
||||
var two = {};
|
||||
var symbolTwo = Symbol('ccc');
|
||||
two[symbolTwo] = 'ddd';
|
||||
|
||||
assignSymbols(obj, one, two);
|
||||
|
||||
console.log(obj[symbolOne]);
|
||||
//=> 'bbb'
|
||||
console.log(obj[symbolTwo]);
|
||||
//=> 'ddd'
|
||||
```
|
||||
|
||||
## Similar projects
|
||||
|
||||
* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties of source objects to a destination object. | [homepage](https://github.com/jonschlinkert/assign-deep)
|
||||
* [clone-deep](https://www.npmjs.com/package/clone-deep): Recursively (deep) clone JavaScript native types, like Object, Array, RegExp, Date as well as primitives. | [homepage](https://github.com/jonschlinkert/clone-deep)
|
||||
* [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)
|
||||
* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep)
|
||||
* [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)
|
||||
|
||||
## Running tests
|
||||
|
||||
Install dev dependencies:
|
||||
|
||||
```sh
|
||||
$ npm i -d && npm test
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/assign-symbols/issues/new).
|
||||
|
||||
## Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
+ [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
|
||||
|
||||
## License
|
||||
|
||||
Copyright © 2015 Jon Schlinkert
|
||||
Released under the MIT license.
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on November 06, 2015._
|
40
node_modules/assign-symbols/index.js
generated
vendored
Normal file
40
node_modules/assign-symbols/index.js
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
/*!
|
||||
* assign-symbols <https://github.com/jonschlinkert/assign-symbols>
|
||||
*
|
||||
* Copyright (c) 2015, Jon Schlinkert.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = function(receiver, objects) {
|
||||
if (receiver === null || typeof receiver === 'undefined') {
|
||||
throw new TypeError('expected first argument to be an object.');
|
||||
}
|
||||
|
||||
if (typeof objects === 'undefined' || typeof Symbol === 'undefined') {
|
||||
return receiver;
|
||||
}
|
||||
|
||||
if (typeof Object.getOwnPropertySymbols !== 'function') {
|
||||
return receiver;
|
||||
}
|
||||
|
||||
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
||||
var target = Object(receiver);
|
||||
var len = arguments.length, i = 0;
|
||||
|
||||
while (++i < len) {
|
||||
var provider = Object(arguments[i]);
|
||||
var names = Object.getOwnPropertySymbols(provider);
|
||||
|
||||
for (var j = 0; j < names.length; j++) {
|
||||
var key = names[j];
|
||||
|
||||
if (isEnumerable.call(provider, key)) {
|
||||
target[key] = provider[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
return target;
|
||||
};
|
71
node_modules/assign-symbols/package.json
generated
vendored
Normal file
71
node_modules/assign-symbols/package.json
generated
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
{
|
||||
"_from": "assign-symbols@^1.0.0",
|
||||
"_id": "assign-symbols@1.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=",
|
||||
"_location": "/assign-symbols",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "assign-symbols@^1.0.0",
|
||||
"name": "assign-symbols",
|
||||
"escapedName": "assign-symbols",
|
||||
"rawSpec": "^1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/extend-shallow"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
|
||||
"_shasum": "59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367",
|
||||
"_spec": "assign-symbols@^1.0.0",
|
||||
"_where": "/Users/evanm/src/zebraPrinter/ZebraPrinter/node_modules/extend-shallow",
|
||||
"author": {
|
||||
"name": "Jon Schlinkert",
|
||||
"url": "https://github.com/jonschlinkert"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/assign-symbols/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Assign the enumerable es6 Symbol properties from an object (or objects) to the first object passed on the arguments. Can be used as a supplement to other extend, assign or merge methods as a polyfill for the Symbols part of the es6 Object.assign method.",
|
||||
"devDependencies": {
|
||||
"mocha": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/jonschlinkert/assign-symbols",
|
||||
"keywords": [
|
||||
"assign",
|
||||
"symbols"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "assign-symbols",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/jonschlinkert/assign-symbols.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"verb": {
|
||||
"related": {
|
||||
"list": [
|
||||
"assign-deep",
|
||||
"mixin-deep",
|
||||
"merge-deep",
|
||||
"extend-shallow",
|
||||
"clone-deep"
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": "1.0.0"
|
||||
}
|
230
node_modules/atob/LICENSE
generated
vendored
Normal file
230
node_modules/atob/LICENSE
generated
vendored
Normal file
@ -0,0 +1,230 @@
|
||||
At your option you may choose either of the following licenses:
|
||||
|
||||
* The MIT License (MIT)
|
||||
* The Apache License 2.0 (Apache-2.0)
|
||||
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 AJ ONeal
|
||||
|
||||
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.
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2015 AJ ONeal
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
319
node_modules/atob/LICENSE.DOCS
generated
vendored
Normal file
319
node_modules/atob/LICENSE.DOCS
generated
vendored
Normal file
@ -0,0 +1,319 @@
|
||||
Creative Commons Legal Code
|
||||
|
||||
Attribution 3.0 Unported
|
||||
|
||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||
LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN
|
||||
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||
REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR
|
||||
DAMAGES RESULTING FROM ITS USE.
|
||||
|
||||
License
|
||||
|
||||
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
|
||||
COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY
|
||||
COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
|
||||
AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
|
||||
|
||||
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE
|
||||
TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY
|
||||
BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS
|
||||
CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND
|
||||
CONDITIONS.
|
||||
|
||||
1. Definitions
|
||||
|
||||
a. "Adaptation" means a work based upon the Work, or upon the Work and
|
||||
other pre-existing works, such as a translation, adaptation,
|
||||
derivative work, arrangement of music or other alterations of a
|
||||
literary or artistic work, or phonogram or performance and includes
|
||||
cinematographic adaptations or any other form in which the Work may be
|
||||
recast, transformed, or adapted including in any form recognizably
|
||||
derived from the original, except that a work that constitutes a
|
||||
Collection will not be considered an Adaptation for the purpose of
|
||||
this License. For the avoidance of doubt, where the Work is a musical
|
||||
work, performance or phonogram, the synchronization of the Work in
|
||||
timed-relation with a moving image ("synching") will be considered an
|
||||
Adaptation for the purpose of this License.
|
||||
b. "Collection" means a collection of literary or artistic works, such as
|
||||
encyclopedias and anthologies, or performances, phonograms or
|
||||
broadcasts, or other works or subject matter other than works listed
|
||||
in Section 1(f) below, which, by reason of the selection and
|
||||
arrangement of their contents, constitute intellectual creations, in
|
||||
which the Work is included in its entirety in unmodified form along
|
||||
with one or more other contributions, each constituting separate and
|
||||
independent works in themselves, which together are assembled into a
|
||||
collective whole. A work that constitutes a Collection will not be
|
||||
considered an Adaptation (as defined above) for the purposes of this
|
||||
License.
|
||||
c. "Distribute" means to make available to the public the original and
|
||||
copies of the Work or Adaptation, as appropriate, through sale or
|
||||
other transfer of ownership.
|
||||
d. "Licensor" means the individual, individuals, entity or entities that
|
||||
offer(s) the Work under the terms of this License.
|
||||
e. "Original Author" means, in the case of a literary or artistic work,
|
||||
the individual, individuals, entity or entities who created the Work
|
||||
or if no individual or entity can be identified, the publisher; and in
|
||||
addition (i) in the case of a performance the actors, singers,
|
||||
musicians, dancers, and other persons who act, sing, deliver, declaim,
|
||||
play in, interpret or otherwise perform literary or artistic works or
|
||||
expressions of folklore; (ii) in the case of a phonogram the producer
|
||||
being the person or legal entity who first fixes the sounds of a
|
||||
performance or other sounds; and, (iii) in the case of broadcasts, the
|
||||
organization that transmits the broadcast.
|
||||
f. "Work" means the literary and/or artistic work offered under the terms
|
||||
of this License including without limitation any production in the
|
||||
literary, scientific and artistic domain, whatever may be the mode or
|
||||
form of its expression including digital form, such as a book,
|
||||
pamphlet and other writing; a lecture, address, sermon or other work
|
||||
of the same nature; a dramatic or dramatico-musical work; a
|
||||
choreographic work or entertainment in dumb show; a musical
|
||||
composition with or without words; a cinematographic work to which are
|
||||
assimilated works expressed by a process analogous to cinematography;
|
||||
a work of drawing, painting, architecture, sculpture, engraving or
|
||||
lithography; a photographic work to which are assimilated works
|
||||
expressed by a process analogous to photography; a work of applied
|
||||
art; an illustration, map, plan, sketch or three-dimensional work
|
||||
relative to geography, topography, architecture or science; a
|
||||
performance; a broadcast; a phonogram; a compilation of data to the
|
||||
extent it is protected as a copyrightable work; or a work performed by
|
||||
a variety or circus performer to the extent it is not otherwise
|
||||
considered a literary or artistic work.
|
||||
g. "You" means an individual or entity exercising rights under this
|
||||
License who has not previously violated the terms of this License with
|
||||
respect to the Work, or who has received express permission from the
|
||||
Licensor to exercise rights under this License despite a previous
|
||||
violation.
|
||||
h. "Publicly Perform" means to perform public recitations of the Work and
|
||||
to communicate to the public those public recitations, by any means or
|
||||
process, including by wire or wireless means or public digital
|
||||
performances; to make available to the public Works in such a way that
|
||||
members of the public may access these Works from a place and at a
|
||||
place individually chosen by them; to perform the Work to the public
|
||||
by any means or process and the communication to the public of the
|
||||
performances of the Work, including by public digital performance; to
|
||||
broadcast and rebroadcast the Work by any means including signs,
|
||||
sounds or images.
|
||||
i. "Reproduce" means to make copies of the Work by any means including
|
||||
without limitation by sound or visual recordings and the right of
|
||||
fixation and reproducing fixations of the Work, including storage of a
|
||||
protected performance or phonogram in digital form or other electronic
|
||||
medium.
|
||||
|
||||
2. Fair Dealing Rights. Nothing in this License is intended to reduce,
|
||||
limit, or restrict any uses free from copyright or rights arising from
|
||||
limitations or exceptions that are provided for in connection with the
|
||||
copyright protection under copyright law or other applicable laws.
|
||||
|
||||
3. License Grant. Subject to the terms and conditions of this License,
|
||||
Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
|
||||
perpetual (for the duration of the applicable copyright) license to
|
||||
exercise the rights in the Work as stated below:
|
||||
|
||||
a. to Reproduce the Work, to incorporate the Work into one or more
|
||||
Collections, and to Reproduce the Work as incorporated in the
|
||||
Collections;
|
||||
b. to create and Reproduce Adaptations provided that any such Adaptation,
|
||||
including any translation in any medium, takes reasonable steps to
|
||||
clearly label, demarcate or otherwise identify that changes were made
|
||||
to the original Work. For example, a translation could be marked "The
|
||||
original work was translated from English to Spanish," or a
|
||||
modification could indicate "The original work has been modified.";
|
||||
c. to Distribute and Publicly Perform the Work including as incorporated
|
||||
in Collections; and,
|
||||
d. to Distribute and Publicly Perform Adaptations.
|
||||
e. For the avoidance of doubt:
|
||||
|
||||
i. Non-waivable Compulsory License Schemes. In those jurisdictions in
|
||||
which the right to collect royalties through any statutory or
|
||||
compulsory licensing scheme cannot be waived, the Licensor
|
||||
reserves the exclusive right to collect such royalties for any
|
||||
exercise by You of the rights granted under this License;
|
||||
ii. Waivable Compulsory License Schemes. In those jurisdictions in
|
||||
which the right to collect royalties through any statutory or
|
||||
compulsory licensing scheme can be waived, the Licensor waives the
|
||||
exclusive right to collect such royalties for any exercise by You
|
||||
of the rights granted under this License; and,
|
||||
iii. Voluntary License Schemes. The Licensor waives the right to
|
||||
collect royalties, whether individually or, in the event that the
|
||||
Licensor is a member of a collecting society that administers
|
||||
voluntary licensing schemes, via that society, from any exercise
|
||||
by You of the rights granted under this License.
|
||||
|
||||
The above rights may be exercised in all media and formats whether now
|
||||
known or hereafter devised. The above rights include the right to make
|
||||
such modifications as are technically necessary to exercise the rights in
|
||||
other media and formats. Subject to Section 8(f), all rights not expressly
|
||||
granted by Licensor are hereby reserved.
|
||||
|
||||
4. Restrictions. The license granted in Section 3 above is expressly made
|
||||
subject to and limited by the following restrictions:
|
||||
|
||||
a. You may Distribute or Publicly Perform the Work only under the terms
|
||||
of this License. You must include a copy of, or the Uniform Resource
|
||||
Identifier (URI) for, this License with every copy of the Work You
|
||||
Distribute or Publicly Perform. You may not offer or impose any terms
|
||||
on the Work that restrict the terms of this License or the ability of
|
||||
the recipient of the Work to exercise the rights granted to that
|
||||
recipient under the terms of the License. You may not sublicense the
|
||||
Work. You must keep intact all notices that refer to this License and
|
||||
to the disclaimer of warranties with every copy of the Work You
|
||||
Distribute or Publicly Perform. When You Distribute or Publicly
|
||||
Perform the Work, You may not impose any effective technological
|
||||
measures on the Work that restrict the ability of a recipient of the
|
||||
Work from You to exercise the rights granted to that recipient under
|
||||
the terms of the License. This Section 4(a) applies to the Work as
|
||||
incorporated in a Collection, but this does not require the Collection
|
||||
apart from the Work itself to be made subject to the terms of this
|
||||
License. If You create a Collection, upon notice from any Licensor You
|
||||
must, to the extent practicable, remove from the Collection any credit
|
||||
as required by Section 4(b), as requested. If You create an
|
||||
Adaptation, upon notice from any Licensor You must, to the extent
|
||||
practicable, remove from the Adaptation any credit as required by
|
||||
Section 4(b), as requested.
|
||||
b. If You Distribute, or Publicly Perform the Work or any Adaptations or
|
||||
Collections, You must, unless a request has been made pursuant to
|
||||
Section 4(a), keep intact all copyright notices for the Work and
|
||||
provide, reasonable to the medium or means You are utilizing: (i) the
|
||||
name of the Original Author (or pseudonym, if applicable) if supplied,
|
||||
and/or if the Original Author and/or Licensor designate another party
|
||||
or parties (e.g., a sponsor institute, publishing entity, journal) for
|
||||
attribution ("Attribution Parties") in Licensor's copyright notice,
|
||||
terms of service or by other reasonable means, the name of such party
|
||||
or parties; (ii) the title of the Work if supplied; (iii) to the
|
||||
extent reasonably practicable, the URI, if any, that Licensor
|
||||
specifies to be associated with the Work, unless such URI does not
|
||||
refer to the copyright notice or licensing information for the Work;
|
||||
and (iv) , consistent with Section 3(b), in the case of an Adaptation,
|
||||
a credit identifying the use of the Work in the Adaptation (e.g.,
|
||||
"French translation of the Work by Original Author," or "Screenplay
|
||||
based on original Work by Original Author"). The credit required by
|
||||
this Section 4 (b) may be implemented in any reasonable manner;
|
||||
provided, however, that in the case of a Adaptation or Collection, at
|
||||
a minimum such credit will appear, if a credit for all contributing
|
||||
authors of the Adaptation or Collection appears, then as part of these
|
||||
credits and in a manner at least as prominent as the credits for the
|
||||
other contributing authors. For the avoidance of doubt, You may only
|
||||
use the credit required by this Section for the purpose of attribution
|
||||
in the manner set out above and, by exercising Your rights under this
|
||||
License, You may not implicitly or explicitly assert or imply any
|
||||
connection with, sponsorship or endorsement by the Original Author,
|
||||
Licensor and/or Attribution Parties, as appropriate, of You or Your
|
||||
use of the Work, without the separate, express prior written
|
||||
permission of the Original Author, Licensor and/or Attribution
|
||||
Parties.
|
||||
c. Except as otherwise agreed in writing by the Licensor or as may be
|
||||
otherwise permitted by applicable law, if You Reproduce, Distribute or
|
||||
Publicly Perform the Work either by itself or as part of any
|
||||
Adaptations or Collections, You must not distort, mutilate, modify or
|
||||
take other derogatory action in relation to the Work which would be
|
||||
prejudicial to the Original Author's honor or reputation. Licensor
|
||||
agrees that in those jurisdictions (e.g. Japan), in which any exercise
|
||||
of the right granted in Section 3(b) of this License (the right to
|
||||
make Adaptations) would be deemed to be a distortion, mutilation,
|
||||
modification or other derogatory action prejudicial to the Original
|
||||
Author's honor and reputation, the Licensor will waive or not assert,
|
||||
as appropriate, this Section, to the fullest extent permitted by the
|
||||
applicable national law, to enable You to reasonably exercise Your
|
||||
right under Section 3(b) of this License (right to make Adaptations)
|
||||
but not otherwise.
|
||||
|
||||
5. Representations, Warranties and Disclaimer
|
||||
|
||||
UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR
|
||||
OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY
|
||||
KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,
|
||||
INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF
|
||||
LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,
|
||||
WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION
|
||||
OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
|
||||
|
||||
6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE
|
||||
LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR
|
||||
ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES
|
||||
ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS
|
||||
BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
7. Termination
|
||||
|
||||
a. This License and the rights granted hereunder will terminate
|
||||
automatically upon any breach by You of the terms of this License.
|
||||
Individuals or entities who have received Adaptations or Collections
|
||||
from You under this License, however, will not have their licenses
|
||||
terminated provided such individuals or entities remain in full
|
||||
compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will
|
||||
survive any termination of this License.
|
||||
b. Subject to the above terms and conditions, the license granted here is
|
||||
perpetual (for the duration of the applicable copyright in the Work).
|
||||
Notwithstanding the above, Licensor reserves the right to release the
|
||||
Work under different license terms or to stop distributing the Work at
|
||||
any time; provided, however that any such election will not serve to
|
||||
withdraw this License (or any other license that has been, or is
|
||||
required to be, granted under the terms of this License), and this
|
||||
License will continue in full force and effect unless terminated as
|
||||
stated above.
|
||||
|
||||
8. Miscellaneous
|
||||
|
||||
a. Each time You Distribute or Publicly Perform the Work or a Collection,
|
||||
the Licensor offers to the recipient a license to the Work on the same
|
||||
terms and conditions as the license granted to You under this License.
|
||||
b. Each time You Distribute or Publicly Perform an Adaptation, Licensor
|
||||
offers to the recipient a license to the original Work on the same
|
||||
terms and conditions as the license granted to You under this License.
|
||||
c. If any provision of this License is invalid or unenforceable under
|
||||
applicable law, it shall not affect the validity or enforceability of
|
||||
the remainder of the terms of this License, and without further action
|
||||
by the parties to this agreement, such provision shall be reformed to
|
||||
the minimum extent necessary to make such provision valid and
|
||||
enforceable.
|
||||
d. No term or provision of this License shall be deemed waived and no
|
||||
breach consented to unless such waiver or consent shall be in writing
|
||||
and signed by the party to be charged with such waiver or consent.
|
||||
e. This License constitutes the entire agreement between the parties with
|
||||
respect to the Work licensed here. There are no understandings,
|
||||
agreements or representations with respect to the Work not specified
|
||||
here. Licensor shall not be bound by any additional provisions that
|
||||
may appear in any communication from You. This License may not be
|
||||
modified without the mutual written agreement of the Licensor and You.
|
||||
f. The rights granted under, and the subject matter referenced, in this
|
||||
License were drafted utilizing the terminology of the Berne Convention
|
||||
for the Protection of Literary and Artistic Works (as amended on
|
||||
September 28, 1979), the Rome Convention of 1961, the WIPO Copyright
|
||||
Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996
|
||||
and the Universal Copyright Convention (as revised on July 24, 1971).
|
||||
These rights and subject matter take effect in the relevant
|
||||
jurisdiction in which the License terms are sought to be enforced
|
||||
according to the corresponding provisions of the implementation of
|
||||
those treaty provisions in the applicable national law. If the
|
||||
standard suite of rights granted under applicable copyright law
|
||||
includes additional rights not granted under this License, such
|
||||
additional rights are deemed to be included in the License; this
|
||||
License is not intended to restrict the license of any rights under
|
||||
applicable law.
|
||||
|
||||
|
||||
Creative Commons Notice
|
||||
|
||||
Creative Commons is not a party to this License, and makes no warranty
|
||||
whatsoever in connection with the Work. Creative Commons will not be
|
||||
liable to You or any party on any legal theory for any damages
|
||||
whatsoever, including without limitation any general, special,
|
||||
incidental or consequential damages arising in connection to this
|
||||
license. Notwithstanding the foregoing two (2) sentences, if Creative
|
||||
Commons has expressly identified itself as the Licensor hereunder, it
|
||||
shall have all rights and obligations of Licensor.
|
||||
|
||||
Except for the limited purpose of indicating to the public that the
|
||||
Work is licensed under the CCPL, Creative Commons does not authorize
|
||||
the use by either party of the trademark "Creative Commons" or any
|
||||
related trademark or logo of Creative Commons without the prior
|
||||
written consent of Creative Commons. Any permitted use will be in
|
||||
compliance with Creative Commons' then-current trademark usage
|
||||
guidelines, as may be published on its website or otherwise made
|
||||
available upon request from time to time. For the avoidance of doubt,
|
||||
this trademark restriction does not form part of this License.
|
||||
|
||||
Creative Commons may be contacted at http://creativecommons.org/.
|
49
node_modules/atob/README.md
generated
vendored
Normal file
49
node_modules/atob/README.md
generated
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
atob
|
||||
===
|
||||
|
||||
| **atob**
|
||||
| [btoa](https://git.coolaj86.com/coolaj86/btoa.js)
|
||||
| [unibabel.js](https://git.coolaj86.com/coolaj86/unibabel.js)
|
||||
| Sponsored by [ppl](https://ppl.family)
|
||||
|
||||
Uses `Buffer` to emulate the exact functionality of the browser's atob.
|
||||
|
||||
Note: Unicode may be handled incorrectly (like the browser).
|
||||
|
||||
It turns base64-encoded <strong>a</strong>scii data back **to** <strong>b</strong>inary.
|
||||
|
||||
```javascript
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
var atob = require('atob');
|
||||
var b64 = "SGVsbG8sIFdvcmxkIQ==";
|
||||
var bin = atob(b64);
|
||||
|
||||
console.log(bin); // "Hello, World!"
|
||||
}());
|
||||
```
|
||||
|
||||
### Need Unicode and Binary Support in the Browser?
|
||||
|
||||
Check out [unibabel.js](https://git.coolaj86.com/coolaj86/unibabel.js)
|
||||
|
||||
Changelog
|
||||
=======
|
||||
|
||||
* v2.1.0 address a few issues and PRs, update URLs
|
||||
* v2.0.0 provide browser version for ios web workers
|
||||
* v1.2.0 provide (empty) browser version
|
||||
* v1.1.3 add MIT license
|
||||
* v1.1.2 node only
|
||||
|
||||
LICENSE
|
||||
=======
|
||||
|
||||
Code copyright 2012-2018 AJ ONeal
|
||||
|
||||
Dual-licensed MIT and Apache-2.0
|
||||
|
||||
Docs copyright 2012-2018 AJ ONeal
|
||||
|
||||
Docs released under [Creative Commons](https://git.coolaj86.com/coolaj86/atob.js/blob/master/LICENSE.DOCS).
|
6
node_modules/atob/bin/atob.js
generated
vendored
Executable file
6
node_modules/atob/bin/atob.js
generated
vendored
Executable file
@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
|
||||
var atob = require('../node-atob');
|
||||
var str = process.argv[2];
|
||||
console.log(atob(str));
|
25
node_modules/atob/bower.json
generated
vendored
Normal file
25
node_modules/atob/bower.json
generated
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "atob",
|
||||
"description": "atob for isomorphic environments",
|
||||
"main": "browser-atob.js",
|
||||
"authors": [
|
||||
"AJ ONeal <coolaj86@gmail.com> (https://coolaj86.com)"
|
||||
],
|
||||
"license": "(MIT OR Apache-2.0)",
|
||||
"keywords": [
|
||||
"atob",
|
||||
"browser"
|
||||
],
|
||||
"homepage": "https://github.com/node-browser-compat/atob",
|
||||
"moduleType": [
|
||||
"globals"
|
||||
],
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"tests"
|
||||
],
|
||||
"version": "2.0.3"
|
||||
}
|
44
node_modules/atob/browser-atob.js
generated
vendored
Normal file
44
node_modules/atob/browser-atob.js
generated
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
(function (w) {
|
||||
"use strict";
|
||||
|
||||
function findBest(atobNative) {
|
||||
// normal window
|
||||
if ('function' === typeof atobNative) { return atobNative; }
|
||||
|
||||
|
||||
// browserify (web worker)
|
||||
if ('function' === typeof Buffer) {
|
||||
return function atobBrowserify(a) {
|
||||
//!! Deliberately using an API that's deprecated in node.js because
|
||||
//!! this file is for browsers and we expect them to cope with it.
|
||||
//!! Discussion: github.com/node-browser-compat/atob/pull/9
|
||||
return new Buffer(a, 'base64').toString('binary');
|
||||
};
|
||||
}
|
||||
|
||||
// ios web worker with base64js
|
||||
if ('object' === typeof w.base64js) {
|
||||
// bufferToBinaryString
|
||||
// https://git.coolaj86.com/coolaj86/unibabel.js/blob/master/index.js#L50
|
||||
return function atobWebWorker_iOS(a) {
|
||||
var buf = w.base64js.b64ToByteArray(a);
|
||||
return Array.prototype.map.call(buf, function (ch) {
|
||||
return String.fromCharCode(ch);
|
||||
}).join('');
|
||||
};
|
||||
}
|
||||
|
||||
return function () {
|
||||
// ios web worker without base64js
|
||||
throw new Error("You're probably in an old browser or an iOS webworker." +
|
||||
" It might help to include beatgammit's base64-js.");
|
||||
};
|
||||
}
|
||||
|
||||
var atobBest = findBest(w.atob);
|
||||
w.atob = atobBest;
|
||||
|
||||
if ((typeof module === 'object') && module && module.exports) {
|
||||
module.exports = atobBest;
|
||||
}
|
||||
}(window));
|
7
node_modules/atob/node-atob.js
generated
vendored
Normal file
7
node_modules/atob/node-atob.js
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
function atob(str) {
|
||||
return Buffer.from(str, 'base64').toString('binary');
|
||||
}
|
||||
|
||||
module.exports = atob.atob = atob;
|
53
node_modules/atob/package.json
generated
vendored
Normal file
53
node_modules/atob/package.json
generated
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
{
|
||||
"_from": "atob@^2.0.0",
|
||||
"_id": "atob@2.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-SuiKH8vbsOyCALjA/+EINmt/Kdl+TQPrtFgW7XZZcwtryFu9e5kQoX3bjCW6mIvGH1fbeAZZuvwGR5IlBRznGw==",
|
||||
"_location": "/atob",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "atob@^2.0.0",
|
||||
"name": "atob",
|
||||
"escapedName": "atob",
|
||||
"rawSpec": "^2.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/source-map-resolve"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/atob/-/atob-2.1.0.tgz",
|
||||
"_shasum": "ab2b150e51d7b122b9efc8d7340c06b6c41076bc",
|
||||
"_spec": "atob@^2.0.0",
|
||||
"_where": "/Users/evanm/src/zebraPrinter/ZebraPrinter/node_modules/source-map-resolve",
|
||||
"author": {
|
||||
"name": "AJ ONeal",
|
||||
"email": "coolaj86@gmail.com",
|
||||
"url": "https://coolaj86.com"
|
||||
},
|
||||
"bin": {
|
||||
"atob": "bin/atob.js"
|
||||
},
|
||||
"browser": "browser-atob.js",
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "atob for Node.JS and Linux / Mac / Windows CLI (it's a one-liner)",
|
||||
"engines": {
|
||||
"node": ">= 0.4.0"
|
||||
},
|
||||
"homepage": "https://git.coolaj86.com/coolaj86/atob.js.git",
|
||||
"keywords": [
|
||||
"atob",
|
||||
"browser"
|
||||
],
|
||||
"license": "(MIT OR Apache-2.0)",
|
||||
"main": "node-atob.js",
|
||||
"name": "atob",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://git.coolaj86.com/coolaj86/atob.js.git"
|
||||
},
|
||||
"version": "2.1.0"
|
||||
}
|
18
node_modules/atob/test.js
generated
vendored
Normal file
18
node_modules/atob/test.js
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
var atob = require('.');
|
||||
var encoded = "SGVsbG8sIFdvcmxkIQ=="
|
||||
var unencoded = "Hello, World!";
|
||||
/*
|
||||
, encoded = "SGVsbG8sIBZM"
|
||||
, unencoded = "Hello, 世界"
|
||||
*/
|
||||
|
||||
if (unencoded !== atob(encoded)) {
|
||||
console.log('[FAIL]', unencoded, atob(encoded));
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('[PASS] all tests pass');
|
||||
}());
|
5
node_modules/balanced-match/.npmignore
generated
vendored
Normal file
5
node_modules/balanced-match/.npmignore
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
test
|
||||
.gitignore
|
||||
.travis.yml
|
||||
Makefile
|
||||
example.js
|
21
node_modules/balanced-match/LICENSE.md
generated
vendored
Normal file
21
node_modules/balanced-match/LICENSE.md
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
(MIT)
|
||||
|
||||
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
91
node_modules/balanced-match/README.md
generated
vendored
Normal file
91
node_modules/balanced-match/README.md
generated
vendored
Normal file
@ -0,0 +1,91 @@
|
||||
# balanced-match
|
||||
|
||||
Match balanced string pairs, like `{` and `}` or `<b>` and `</b>`. Supports regular expressions as well!
|
||||
|
||||
[](http://travis-ci.org/juliangruber/balanced-match)
|
||||
[](https://www.npmjs.org/package/balanced-match)
|
||||
|
||||
[](https://ci.testling.com/juliangruber/balanced-match)
|
||||
|
||||
## Example
|
||||
|
||||
Get the first matching pair of braces:
|
||||
|
||||
```js
|
||||
var balanced = require('balanced-match');
|
||||
|
||||
console.log(balanced('{', '}', 'pre{in{nested}}post'));
|
||||
console.log(balanced('{', '}', 'pre{first}between{second}post'));
|
||||
console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post'));
|
||||
```
|
||||
|
||||
The matches are:
|
||||
|
||||
```bash
|
||||
$ node example.js
|
||||
{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' }
|
||||
{ start: 3,
|
||||
end: 9,
|
||||
pre: 'pre',
|
||||
body: 'first',
|
||||
post: 'between{second}post' }
|
||||
{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' }
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### var m = balanced(a, b, str)
|
||||
|
||||
For the first non-nested matching pair of `a` and `b` in `str`, return an
|
||||
object with those keys:
|
||||
|
||||
* **start** the index of the first match of `a`
|
||||
* **end** the index of the matching `b`
|
||||
* **pre** the preamble, `a` and `b` not included
|
||||
* **body** the match, `a` and `b` not included
|
||||
* **post** the postscript, `a` and `b` not included
|
||||
|
||||
If there's no match, `undefined` will be returned.
|
||||
|
||||
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`.
|
||||
|
||||
### var r = balanced.range(a, b, str)
|
||||
|
||||
For the first non-nested matching pair of `a` and `b` in `str`, return an
|
||||
array with indexes: `[ <a index>, <b index> ]`.
|
||||
|
||||
If there's no match, `undefined` will be returned.
|
||||
|
||||
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`.
|
||||
|
||||
## Installation
|
||||
|
||||
With [npm](https://npmjs.org) do:
|
||||
|
||||
```bash
|
||||
npm install balanced-match
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
(MIT)
|
||||
|
||||
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
59
node_modules/balanced-match/index.js
generated
vendored
Normal file
59
node_modules/balanced-match/index.js
generated
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
'use strict';
|
||||
module.exports = balanced;
|
||||
function balanced(a, b, str) {
|
||||
if (a instanceof RegExp) a = maybeMatch(a, str);
|
||||
if (b instanceof RegExp) b = maybeMatch(b, str);
|
||||
|
||||
var r = range(a, b, str);
|
||||
|
||||
return r && {
|
||||
start: r[0],
|
||||
end: r[1],
|
||||
pre: str.slice(0, r[0]),
|
||||
body: str.slice(r[0] + a.length, r[1]),
|
||||
post: str.slice(r[1] + b.length)
|
||||
};
|
||||
}
|
||||
|
||||
function maybeMatch(reg, str) {
|
||||
var m = str.match(reg);
|
||||
return m ? m[0] : null;
|
||||
}
|
||||
|
||||
balanced.range = range;
|
||||
function range(a, b, str) {
|
||||
var begs, beg, left, right, result;
|
||||
var ai = str.indexOf(a);
|
||||
var bi = str.indexOf(b, ai + 1);
|
||||
var i = ai;
|
||||
|
||||
if (ai >= 0 && bi > 0) {
|
||||
begs = [];
|
||||
left = str.length;
|
||||
|
||||
while (i >= 0 && !result) {
|
||||
if (i == ai) {
|
||||
begs.push(i);
|
||||
ai = str.indexOf(a, i + 1);
|
||||
} else if (begs.length == 1) {
|
||||
result = [ begs.pop(), bi ];
|
||||
} else {
|
||||
beg = begs.pop();
|
||||
if (beg < left) {
|
||||
left = beg;
|
||||
right = bi;
|
||||
}
|
||||
|
||||
bi = str.indexOf(b, i + 1);
|
||||
}
|
||||
|
||||
i = ai < bi && ai >= 0 ? ai : bi;
|
||||
}
|
||||
|
||||
if (begs.length) {
|
||||
result = [ left, right ];
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
77
node_modules/balanced-match/package.json
generated
vendored
Normal file
77
node_modules/balanced-match/package.json
generated
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
{
|
||||
"_from": "balanced-match@^1.0.0",
|
||||
"_id": "balanced-match@1.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
||||
"_location": "/balanced-match",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "balanced-match@^1.0.0",
|
||||
"name": "balanced-match",
|
||||
"escapedName": "balanced-match",
|
||||
"rawSpec": "^1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/brace-expansion"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||
"_shasum": "89b4d199ab2bee49de164ea02b89ce462d71b767",
|
||||
"_spec": "balanced-match@^1.0.0",
|
||||
"_where": "/Users/evanm/src/zebraPrinter/ZebraPrinter/node_modules/brace-expansion",
|
||||
"author": {
|
||||
"name": "Julian Gruber",
|
||||
"email": "mail@juliangruber.com",
|
||||
"url": "http://juliangruber.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/juliangruber/balanced-match/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {},
|
||||
"deprecated": false,
|
||||
"description": "Match balanced character pairs, like \"{\" and \"}\"",
|
||||
"devDependencies": {
|
||||
"matcha": "^0.7.0",
|
||||
"tape": "^4.6.0"
|
||||
},
|
||||
"homepage": "https://github.com/juliangruber/balanced-match",
|
||||
"keywords": [
|
||||
"match",
|
||||
"regexp",
|
||||
"test",
|
||||
"balanced",
|
||||
"parse"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "balanced-match",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/juliangruber/balanced-match.git"
|
||||
},
|
||||
"scripts": {
|
||||
"bench": "make bench",
|
||||
"test": "make test"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/*.js",
|
||||
"browsers": [
|
||||
"ie/8..latest",
|
||||
"firefox/20..latest",
|
||||
"firefox/nightly",
|
||||
"chrome/25..latest",
|
||||
"chrome/canary",
|
||||
"opera/12..latest",
|
||||
"opera/next",
|
||||
"safari/5.1..latest",
|
||||
"ipad/6.0..latest",
|
||||
"iphone/6.0..latest",
|
||||
"android-browser/4.2..latest"
|
||||
]
|
||||
},
|
||||
"version": "1.0.0"
|
||||
}
|
21
node_modules/base/LICENSE
generated
vendored
Normal file
21
node_modules/base/LICENSE
generated
vendored
Normal 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
491
node_modules/base/README.md
generated
vendored
Normal 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 [](https://www.npmjs.com/package/base) [](https://npmjs.org/package/base) [](https://npmjs.org/package/base) [](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
435
node_modules/base/index.js
generated
vendored
Normal 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
21
node_modules/base/node_modules/define-property/LICENSE
generated
vendored
Normal 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.
|
95
node_modules/base/node_modules/define-property/README.md
generated
vendored
Normal file
95
node_modules/base/node_modules/define-property/README.md
generated
vendored
Normal file
@ -0,0 +1,95 @@
|
||||
# define-property [](https://www.npmjs.com/package/define-property) [](https://npmjs.org/package/define-property) [](https://npmjs.org/package/define-property) [](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._
|
31
node_modules/base/node_modules/define-property/index.js
generated
vendored
Normal file
31
node_modules/base/node_modules/define-property/index.js
generated
vendored
Normal 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
|
||||
});
|
||||
};
|
93
node_modules/base/node_modules/define-property/package.json
generated
vendored
Normal file
93
node_modules/base/node_modules/define-property/package.json
generated
vendored
Normal file
@ -0,0 +1,93 @@
|
||||
{
|
||||
"_from": "define-property@^1.0.0",
|
||||
"_id": "define-property@1.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
|
||||
"_location": "/base/define-property",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "define-property@^1.0.0",
|
||||
"name": "define-property",
|
||||
"escapedName": "define-property",
|
||||
"rawSpec": "^1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/base"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
|
||||
"_shasum": "769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6",
|
||||
"_spec": "define-property@^1.0.0",
|
||||
"_where": "/Users/evanm/src/zebraPrinter/ZebraPrinter/node_modules/base",
|
||||
"author": {
|
||||
"name": "Jon Schlinkert",
|
||||
"url": "https://github.com/jonschlinkert"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/define-property/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"is-descriptor": "^1.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Define a non-enumerable property on an object.",
|
||||
"devDependencies": {
|
||||
"gulp-format-md": "^0.1.12",
|
||||
"mocha": "^3.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"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",
|
||||
"name": "define-property",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/jonschlinkert/define-property.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"verb": {
|
||||
"related": {
|
||||
"list": [
|
||||
"extend-shallow",
|
||||
"merge-deep",
|
||||
"assign-deep",
|
||||
"mixin-deep"
|
||||
]
|
||||
},
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
},
|
||||
"version": "1.0.0"
|
||||
}
|
21
node_modules/base/node_modules/is-accessor-descriptor/LICENSE
generated
vendored
Normal file
21
node_modules/base/node_modules/is-accessor-descriptor/LICENSE
generated
vendored
Normal 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.
|
144
node_modules/base/node_modules/is-accessor-descriptor/README.md
generated
vendored
Normal file
144
node_modules/base/node_modules/is-accessor-descriptor/README.md
generated
vendored
Normal file
@ -0,0 +1,144 @@
|
||||
# is-accessor-descriptor [](https://www.npmjs.com/package/is-accessor-descriptor) [](https://npmjs.org/package/is-accessor-descriptor) [](https://npmjs.org/package/is-accessor-descriptor) [](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._
|
69
node_modules/base/node_modules/is-accessor-descriptor/index.js
generated
vendored
Normal file
69
node_modules/base/node_modules/is-accessor-descriptor/index.js
generated
vendored
Normal 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;
|
110
node_modules/base/node_modules/is-accessor-descriptor/package.json
generated
vendored
Normal file
110
node_modules/base/node_modules/is-accessor-descriptor/package.json
generated
vendored
Normal file
@ -0,0 +1,110 @@
|
||||
{
|
||||
"_from": "is-accessor-descriptor@^1.0.0",
|
||||
"_id": "is-accessor-descriptor@1.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
|
||||
"_location": "/base/is-accessor-descriptor",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "is-accessor-descriptor@^1.0.0",
|
||||
"name": "is-accessor-descriptor",
|
||||
"escapedName": "is-accessor-descriptor",
|
||||
"rawSpec": "^1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/base/is-descriptor"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
|
||||
"_shasum": "169c2f6d3df1f992618072365c9b0ea1f6878656",
|
||||
"_spec": "is-accessor-descriptor@^1.0.0",
|
||||
"_where": "/Users/evanm/src/zebraPrinter/ZebraPrinter/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"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Jon Schlinkert",
|
||||
"url": "http://twitter.com/jonschlinkert"
|
||||
},
|
||||
{
|
||||
"name": "Rouven Weßling",
|
||||
"url": "www.rouvenwessling.de"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"kind-of": "^6.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"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"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"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",
|
||||
"name": "is-accessor-descriptor",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/jonschlinkert/is-accessor-descriptor.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"verb": {
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"is-accessor-descriptor",
|
||||
"is-data-descriptor",
|
||||
"is-descriptor",
|
||||
"is-plain-object",
|
||||
"isobject"
|
||||
]
|
||||
},
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
},
|
||||
"version": "1.0.0"
|
||||
}
|
21
node_modules/base/node_modules/is-data-descriptor/LICENSE
generated
vendored
Normal file
21
node_modules/base/node_modules/is-data-descriptor/LICENSE
generated
vendored
Normal 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.
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user