Commit cf12ce419d15663117fa36021a3199b2ee04640b
1 parent
30fb6c36
Exists in
master
delete node-modules
Showing
4456 changed files
with
0 additions
and
544211 deletions
Show diff stats
Too many changes.
To preserve performance only 100 of 4456 files displayed.
node_modules/.bin/har-validator
| ... | ... | @@ -1,15 +0,0 @@ |
| 1 | -#!/bin/sh | |
| 2 | -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | |
| 3 | - | |
| 4 | -case `uname` in | |
| 5 | - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; | |
| 6 | -esac | |
| 7 | - | |
| 8 | -if [ -x "$basedir/node" ]; then | |
| 9 | - "$basedir/node" "$basedir/../har-validator/bin/har-validator" "$@" | |
| 10 | - ret=$? | |
| 11 | -else | |
| 12 | - node "$basedir/../har-validator/bin/har-validator" "$@" | |
| 13 | - ret=$? | |
| 14 | -fi | |
| 15 | -exit $ret |
node_modules/.bin/har-validator.cmd
node_modules/.bin/mime
| ... | ... | @@ -1,15 +0,0 @@ |
| 1 | -#!/bin/sh | |
| 2 | -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | |
| 3 | - | |
| 4 | -case `uname` in | |
| 5 | - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; | |
| 6 | -esac | |
| 7 | - | |
| 8 | -if [ -x "$basedir/node" ]; then | |
| 9 | - "$basedir/node" "$basedir/../mime/cli.js" "$@" | |
| 10 | - ret=$? | |
| 11 | -else | |
| 12 | - node "$basedir/../mime/cli.js" "$@" | |
| 13 | - ret=$? | |
| 14 | -fi | |
| 15 | -exit $ret |
node_modules/.bin/mime.cmd
node_modules/.bin/mkdirp
| ... | ... | @@ -1,15 +0,0 @@ |
| 1 | -#!/bin/sh | |
| 2 | -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | |
| 3 | - | |
| 4 | -case `uname` in | |
| 5 | - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; | |
| 6 | -esac | |
| 7 | - | |
| 8 | -if [ -x "$basedir/node" ]; then | |
| 9 | - "$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@" | |
| 10 | - ret=$? | |
| 11 | -else | |
| 12 | - node "$basedir/../mkdirp/bin/cmd.js" "$@" | |
| 13 | - ret=$? | |
| 14 | -fi | |
| 15 | -exit $ret |
node_modules/.bin/mkdirp.cmd
node_modules/.bin/semver
| ... | ... | @@ -1,15 +0,0 @@ |
| 1 | -#!/bin/sh | |
| 2 | -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | |
| 3 | - | |
| 4 | -case `uname` in | |
| 5 | - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; | |
| 6 | -esac | |
| 7 | - | |
| 8 | -if [ -x "$basedir/node" ]; then | |
| 9 | - "$basedir/node" "$basedir/../semver/bin/semver" "$@" | |
| 10 | - ret=$? | |
| 11 | -else | |
| 12 | - node "$basedir/../semver/bin/semver" "$@" | |
| 13 | - ret=$? | |
| 14 | -fi | |
| 15 | -exit $ret |
node_modules/.bin/semver.cmd
node_modules/.bin/sshpk-conv
| ... | ... | @@ -1,15 +0,0 @@ |
| 1 | -#!/bin/sh | |
| 2 | -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | |
| 3 | - | |
| 4 | -case `uname` in | |
| 5 | - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; | |
| 6 | -esac | |
| 7 | - | |
| 8 | -if [ -x "$basedir/node" ]; then | |
| 9 | - "$basedir/node" "$basedir/../sshpk/bin/sshpk-conv" "$@" | |
| 10 | - ret=$? | |
| 11 | -else | |
| 12 | - node "$basedir/../sshpk/bin/sshpk-conv" "$@" | |
| 13 | - ret=$? | |
| 14 | -fi | |
| 15 | -exit $ret |
node_modules/.bin/sshpk-conv.cmd
node_modules/.bin/sshpk-sign
| ... | ... | @@ -1,15 +0,0 @@ |
| 1 | -#!/bin/sh | |
| 2 | -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | |
| 3 | - | |
| 4 | -case `uname` in | |
| 5 | - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; | |
| 6 | -esac | |
| 7 | - | |
| 8 | -if [ -x "$basedir/node" ]; then | |
| 9 | - "$basedir/node" "$basedir/../sshpk/bin/sshpk-sign" "$@" | |
| 10 | - ret=$? | |
| 11 | -else | |
| 12 | - node "$basedir/../sshpk/bin/sshpk-sign" "$@" | |
| 13 | - ret=$? | |
| 14 | -fi | |
| 15 | -exit $ret |
node_modules/.bin/sshpk-sign.cmd
node_modules/.bin/sshpk-verify
| ... | ... | @@ -1,15 +0,0 @@ |
| 1 | -#!/bin/sh | |
| 2 | -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | |
| 3 | - | |
| 4 | -case `uname` in | |
| 5 | - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; | |
| 6 | -esac | |
| 7 | - | |
| 8 | -if [ -x "$basedir/node" ]; then | |
| 9 | - "$basedir/node" "$basedir/../sshpk/bin/sshpk-verify" "$@" | |
| 10 | - ret=$? | |
| 11 | -else | |
| 12 | - node "$basedir/../sshpk/bin/sshpk-verify" "$@" | |
| 13 | - ret=$? | |
| 14 | -fi | |
| 15 | -exit $ret |
node_modules/.bin/sshpk-verify.cmd
node_modules/.bin/uglifyjs
| ... | ... | @@ -1,15 +0,0 @@ |
| 1 | -#!/bin/sh | |
| 2 | -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | |
| 3 | - | |
| 4 | -case `uname` in | |
| 5 | - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; | |
| 6 | -esac | |
| 7 | - | |
| 8 | -if [ -x "$basedir/node" ]; then | |
| 9 | - "$basedir/node" "$basedir/../uglify-js/bin/uglifyjs" "$@" | |
| 10 | - ret=$? | |
| 11 | -else | |
| 12 | - node "$basedir/../uglify-js/bin/uglifyjs" "$@" | |
| 13 | - ret=$? | |
| 14 | -fi | |
| 15 | -exit $ret |
node_modules/.bin/uglifyjs.cmd
node_modules/.bin/uuid
| ... | ... | @@ -1,15 +0,0 @@ |
| 1 | -#!/bin/sh | |
| 2 | -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | |
| 3 | - | |
| 4 | -case `uname` in | |
| 5 | - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; | |
| 6 | -esac | |
| 7 | - | |
| 8 | -if [ -x "$basedir/node" ]; then | |
| 9 | - "$basedir/node" "$basedir/../uuid/bin/uuid" "$@" | |
| 10 | - ret=$? | |
| 11 | -else | |
| 12 | - node "$basedir/../uuid/bin/uuid" "$@" | |
| 13 | - ret=$? | |
| 14 | -fi | |
| 15 | -exit $ret |
node_modules/.bin/uuid.cmd
node_modules/@sindresorhus/is/dist/example.d.ts
node_modules/@sindresorhus/is/dist/example.js
node_modules/@sindresorhus/is/dist/example.js.map
node_modules/@sindresorhus/is/dist/index.d.ts
| ... | ... | @@ -1,95 +0,0 @@ |
| 1 | -/// <reference types="node" /> | |
| 2 | -export declare const enum TypeName { | |
| 3 | - null = "null", | |
| 4 | - boolean = "boolean", | |
| 5 | - undefined = "undefined", | |
| 6 | - string = "string", | |
| 7 | - number = "number", | |
| 8 | - symbol = "symbol", | |
| 9 | - Function = "Function", | |
| 10 | - Array = "Array", | |
| 11 | - Buffer = "Buffer", | |
| 12 | - Object = "Object", | |
| 13 | - RegExp = "RegExp", | |
| 14 | - Date = "Date", | |
| 15 | - Error = "Error", | |
| 16 | - Map = "Map", | |
| 17 | - Set = "Set", | |
| 18 | - WeakMap = "WeakMap", | |
| 19 | - WeakSet = "WeakSet", | |
| 20 | - Int8Array = "Int8Array", | |
| 21 | - Uint8Array = "Uint8Array", | |
| 22 | - Uint8ClampedArray = "Uint8ClampedArray", | |
| 23 | - Int16Array = "Int16Array", | |
| 24 | - Uint16Array = "Uint16Array", | |
| 25 | - Int32Array = "Int32Array", | |
| 26 | - Uint32Array = "Uint32Array", | |
| 27 | - Float32Array = "Float32Array", | |
| 28 | - Float64Array = "Float64Array", | |
| 29 | - ArrayBuffer = "ArrayBuffer", | |
| 30 | - SharedArrayBuffer = "SharedArrayBuffer", | |
| 31 | - DataView = "DataView", | |
| 32 | - Promise = "Promise", | |
| 33 | -} | |
| 34 | -declare function is(value: any): TypeName; | |
| 35 | -declare namespace is { | |
| 36 | - const undefined: (value: any) => boolean; | |
| 37 | - const string: (value: any) => boolean; | |
| 38 | - const number: (value: any) => boolean; | |
| 39 | - const function_: (value: any) => boolean; | |
| 40 | - const null_: (value: any) => boolean; | |
| 41 | - const class_: (value: any) => any; | |
| 42 | - const boolean: (value: any) => boolean; | |
| 43 | - const symbol: (value: any) => boolean; | |
| 44 | - const array: (arg: any) => arg is any[]; | |
| 45 | - const buffer: (obj: any) => obj is Buffer; | |
| 46 | - const nullOrUndefined: (value: any) => boolean; | |
| 47 | - const object: (value: any) => boolean; | |
| 48 | - const iterable: (value: any) => boolean; | |
| 49 | - const generator: (value: any) => boolean; | |
| 50 | - const nativePromise: (value: any) => boolean; | |
| 51 | - const promise: (value: any) => boolean; | |
| 52 | - const generatorFunction: (value: any) => boolean; | |
| 53 | - const asyncFunction: (value: any) => boolean; | |
| 54 | - const boundFunction: (value: any) => boolean; | |
| 55 | - const regExp: (value: any) => boolean; | |
| 56 | - const date: (value: any) => boolean; | |
| 57 | - const error: (value: any) => boolean; | |
| 58 | - const map: (value: any) => boolean; | |
| 59 | - const set: (value: any) => boolean; | |
| 60 | - const weakMap: (value: any) => boolean; | |
| 61 | - const weakSet: (value: any) => boolean; | |
| 62 | - const int8Array: (value: any) => boolean; | |
| 63 | - const uint8Array: (value: any) => boolean; | |
| 64 | - const uint8ClampedArray: (value: any) => boolean; | |
| 65 | - const int16Array: (value: any) => boolean; | |
| 66 | - const uint16Array: (value: any) => boolean; | |
| 67 | - const int32Array: (value: any) => boolean; | |
| 68 | - const uint32Array: (value: any) => boolean; | |
| 69 | - const float32Array: (value: any) => boolean; | |
| 70 | - const float64Array: (value: any) => boolean; | |
| 71 | - const arrayBuffer: (value: any) => boolean; | |
| 72 | - const sharedArrayBuffer: (value: any) => boolean; | |
| 73 | - const dataView: (value: any) => boolean; | |
| 74 | - const directInstanceOf: (instance: any, klass: any) => boolean; | |
| 75 | - const truthy: (value: any) => boolean; | |
| 76 | - const falsy: (value: any) => boolean; | |
| 77 | - const nan: (value: any) => boolean; | |
| 78 | - const primitive: (value: any) => boolean; | |
| 79 | - const integer: (value: any) => boolean; | |
| 80 | - const safeInteger: (value: any) => boolean; | |
| 81 | - const plainObject: (value: any) => boolean; | |
| 82 | - const typedArray: (value: any) => boolean; | |
| 83 | - const arrayLike: (value: any) => boolean; | |
| 84 | - const inRange: (value: number, range: number | number[]) => boolean; | |
| 85 | - const domElement: (value: any) => boolean; | |
| 86 | - const nodeStream: (value: any) => boolean; | |
| 87 | - const infinite: (value: any) => boolean; | |
| 88 | - const even: (rem: number) => boolean; | |
| 89 | - const odd: (rem: number) => boolean; | |
| 90 | - const empty: (value: any) => boolean; | |
| 91 | - const emptyOrWhitespace: (value: any) => boolean; | |
| 92 | - function any(...predicate: any[]): any; | |
| 93 | - function all(...predicate: any[]): any; | |
| 94 | -} | |
| 95 | -export default is; |
node_modules/@sindresorhus/is/dist/index.js
| ... | ... | @@ -1,215 +0,0 @@ |
| 1 | -"use strict"; | |
| 2 | -Object.defineProperty(exports, "__esModule", { value: true }); | |
| 3 | -const util = require("util"); | |
| 4 | -const toString = Object.prototype.toString; | |
| 5 | -const isOfType = (type) => (value) => typeof value === type; // tslint:disable-line:strict-type-predicates | |
| 6 | -const getObjectType = (value) => { | |
| 7 | - const objectName = toString.call(value).slice(8, -1); | |
| 8 | - if (objectName) { | |
| 9 | - return objectName; | |
| 10 | - } | |
| 11 | - return null; | |
| 12 | -}; | |
| 13 | -const isObjectOfType = (typeName) => (value) => { | |
| 14 | - return getObjectType(value) === typeName; | |
| 15 | -}; | |
| 16 | -function is(value) { | |
| 17 | - if (value === null) { | |
| 18 | - return "null" /* null */; | |
| 19 | - } | |
| 20 | - if (value === true || value === false) { | |
| 21 | - return "boolean" /* boolean */; | |
| 22 | - } | |
| 23 | - const type = typeof value; | |
| 24 | - if (type === 'undefined') { | |
| 25 | - return "undefined" /* undefined */; | |
| 26 | - } | |
| 27 | - if (type === 'string') { | |
| 28 | - return "string" /* string */; | |
| 29 | - } | |
| 30 | - if (type === 'number') { | |
| 31 | - return "number" /* number */; | |
| 32 | - } | |
| 33 | - if (type === 'symbol') { | |
| 34 | - return "symbol" /* symbol */; | |
| 35 | - } | |
| 36 | - if (is.function_(value)) { | |
| 37 | - return "Function" /* Function */; | |
| 38 | - } | |
| 39 | - if (Array.isArray(value)) { | |
| 40 | - return "Array" /* Array */; | |
| 41 | - } | |
| 42 | - if (Buffer.isBuffer(value)) { | |
| 43 | - return "Buffer" /* Buffer */; | |
| 44 | - } | |
| 45 | - const tagType = getObjectType(value); | |
| 46 | - if (tagType) { | |
| 47 | - return tagType; | |
| 48 | - } | |
| 49 | - if (value instanceof String || value instanceof Boolean || value instanceof Number) { | |
| 50 | - throw new TypeError('Please don\'t use object wrappers for primitive types'); | |
| 51 | - } | |
| 52 | - return "Object" /* Object */; | |
| 53 | -} | |
| 54 | -(function (is) { | |
| 55 | - const isObject = (value) => typeof value === 'object'; | |
| 56 | - // tslint:disable:variable-name | |
| 57 | - is.undefined = isOfType('undefined'); | |
| 58 | - is.string = isOfType('string'); | |
| 59 | - is.number = isOfType('number'); | |
| 60 | - is.function_ = isOfType('function'); | |
| 61 | - is.null_ = (value) => value === null; | |
| 62 | - is.class_ = (value) => is.function_(value) && value.toString().startsWith('class '); | |
| 63 | - is.boolean = (value) => value === true || value === false; | |
| 64 | - // tslint:enable:variable-name | |
| 65 | - is.symbol = isOfType('symbol'); | |
| 66 | - is.array = Array.isArray; | |
| 67 | - is.buffer = Buffer.isBuffer; | |
| 68 | - is.nullOrUndefined = (value) => is.null_(value) || is.undefined(value); | |
| 69 | - is.object = (value) => !is.nullOrUndefined(value) && (is.function_(value) || isObject(value)); | |
| 70 | - is.iterable = (value) => !is.nullOrUndefined(value) && is.function_(value[Symbol.iterator]); | |
| 71 | - is.generator = (value) => is.iterable(value) && is.function_(value.next) && is.function_(value.throw); | |
| 72 | - is.nativePromise = isObjectOfType("Promise" /* Promise */); | |
| 73 | - const hasPromiseAPI = (value) => !is.null_(value) && | |
| 74 | - isObject(value) && | |
| 75 | - is.function_(value.then) && | |
| 76 | - is.function_(value.catch); | |
| 77 | - is.promise = (value) => is.nativePromise(value) || hasPromiseAPI(value); | |
| 78 | - // TODO: Change to use `isObjectOfType` once Node.js 6 or higher is targeted | |
| 79 | - const isFunctionOfType = (type) => (value) => is.function_(value) && is.function_(value.constructor) && value.constructor.name === type; | |
| 80 | - is.generatorFunction = isFunctionOfType('GeneratorFunction'); | |
| 81 | - is.asyncFunction = isFunctionOfType('AsyncFunction'); | |
| 82 | - is.boundFunction = (value) => is.function_(value) && !value.hasOwnProperty('prototype'); | |
| 83 | - is.regExp = isObjectOfType("RegExp" /* RegExp */); | |
| 84 | - is.date = isObjectOfType("Date" /* Date */); | |
| 85 | - is.error = isObjectOfType("Error" /* Error */); | |
| 86 | - is.map = isObjectOfType("Map" /* Map */); | |
| 87 | - is.set = isObjectOfType("Set" /* Set */); | |
| 88 | - is.weakMap = isObjectOfType("WeakMap" /* WeakMap */); | |
| 89 | - is.weakSet = isObjectOfType("WeakSet" /* WeakSet */); | |
| 90 | - is.int8Array = isObjectOfType("Int8Array" /* Int8Array */); | |
| 91 | - is.uint8Array = isObjectOfType("Uint8Array" /* Uint8Array */); | |
| 92 | - is.uint8ClampedArray = isObjectOfType("Uint8ClampedArray" /* Uint8ClampedArray */); | |
| 93 | - is.int16Array = isObjectOfType("Int16Array" /* Int16Array */); | |
| 94 | - is.uint16Array = isObjectOfType("Uint16Array" /* Uint16Array */); | |
| 95 | - is.int32Array = isObjectOfType("Int32Array" /* Int32Array */); | |
| 96 | - is.uint32Array = isObjectOfType("Uint32Array" /* Uint32Array */); | |
| 97 | - is.float32Array = isObjectOfType("Float32Array" /* Float32Array */); | |
| 98 | - is.float64Array = isObjectOfType("Float64Array" /* Float64Array */); | |
| 99 | - is.arrayBuffer = isObjectOfType("ArrayBuffer" /* ArrayBuffer */); | |
| 100 | - is.sharedArrayBuffer = isObjectOfType("SharedArrayBuffer" /* SharedArrayBuffer */); | |
| 101 | - is.dataView = isObjectOfType("DataView" /* DataView */); | |
| 102 | - // TODO: Remove `object` checks when targeting ES2015 or higher | |
| 103 | - // See `Notes`: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getPrototypeOf | |
| 104 | - is.directInstanceOf = (instance, klass) => is.object(instance) && is.object(klass) && Object.getPrototypeOf(instance) === klass.prototype; | |
| 105 | - is.truthy = (value) => Boolean(value); | |
| 106 | - is.falsy = (value) => !value; | |
| 107 | - is.nan = (value) => Number.isNaN(value); | |
| 108 | - const primitiveTypes = new Set([ | |
| 109 | - 'undefined', | |
| 110 | - 'string', | |
| 111 | - 'number', | |
| 112 | - 'boolean', | |
| 113 | - 'symbol' | |
| 114 | - ]); | |
| 115 | - is.primitive = (value) => is.null_(value) || primitiveTypes.has(typeof value); | |
| 116 | - is.integer = (value) => Number.isInteger(value); | |
| 117 | - is.safeInteger = (value) => Number.isSafeInteger(value); | |
| 118 | - is.plainObject = (value) => { | |
| 119 | - // From: https://github.com/sindresorhus/is-plain-obj/blob/master/index.js | |
| 120 | - let prototype; | |
| 121 | - return getObjectType(value) === "Object" /* Object */ && | |
| 122 | - (prototype = Object.getPrototypeOf(value), prototype === null || // tslint:disable-line:ban-comma-operator | |
| 123 | - prototype === Object.getPrototypeOf({})); | |
| 124 | - }; | |
| 125 | - const typedArrayTypes = new Set([ | |
| 126 | - "Int8Array" /* Int8Array */, | |
| 127 | - "Uint8Array" /* Uint8Array */, | |
| 128 | - "Uint8ClampedArray" /* Uint8ClampedArray */, | |
| 129 | - "Int16Array" /* Int16Array */, | |
| 130 | - "Uint16Array" /* Uint16Array */, | |
| 131 | - "Int32Array" /* Int32Array */, | |
| 132 | - "Uint32Array" /* Uint32Array */, | |
| 133 | - "Float32Array" /* Float32Array */, | |
| 134 | - "Float64Array" /* Float64Array */ | |
| 135 | - ]); | |
| 136 | - is.typedArray = (value) => { | |
| 137 | - const objectType = getObjectType(value); | |
| 138 | - if (objectType === null) { | |
| 139 | - return false; | |
| 140 | - } | |
| 141 | - return typedArrayTypes.has(objectType); | |
| 142 | - }; | |
| 143 | - const isValidLength = (value) => is.safeInteger(value) && value > -1; | |
| 144 | - is.arrayLike = (value) => !is.nullOrUndefined(value) && !is.function_(value) && isValidLength(value.length); | |
| 145 | - is.inRange = (value, range) => { | |
| 146 | - if (is.number(range)) { | |
| 147 | - return value >= Math.min(0, range) && value <= Math.max(range, 0); | |
| 148 | - } | |
| 149 | - if (is.array(range) && range.length === 2) { | |
| 150 | - // TODO: Use spread operator here when targeting Node.js 6 or higher | |
| 151 | - return value >= Math.min.apply(null, range) && value <= Math.max.apply(null, range); | |
| 152 | - } | |
| 153 | - throw new TypeError(`Invalid range: ${util.inspect(range)}`); | |
| 154 | - }; | |
| 155 | - const NODE_TYPE_ELEMENT = 1; | |
| 156 | - const DOM_PROPERTIES_TO_CHECK = [ | |
| 157 | - 'innerHTML', | |
| 158 | - 'ownerDocument', | |
| 159 | - 'style', | |
| 160 | - 'attributes', | |
| 161 | - 'nodeValue' | |
| 162 | - ]; | |
| 163 | - is.domElement = (value) => is.object(value) && value.nodeType === NODE_TYPE_ELEMENT && is.string(value.nodeName) && | |
| 164 | - !is.plainObject(value) && DOM_PROPERTIES_TO_CHECK.every(property => property in value); | |
| 165 | - is.nodeStream = (value) => !is.nullOrUndefined(value) && isObject(value) && is.function_(value.pipe); | |
| 166 | - is.infinite = (value) => value === Infinity || value === -Infinity; | |
| 167 | - const isAbsoluteMod2 = (value) => (rem) => is.integer(rem) && Math.abs(rem % 2) === value; | |
| 168 | - is.even = isAbsoluteMod2(0); | |
| 169 | - is.odd = isAbsoluteMod2(1); | |
| 170 | - const isWhiteSpaceString = (value) => is.string(value) && /\S/.test(value) === false; | |
| 171 | - const isEmptyStringOrArray = (value) => (is.string(value) || is.array(value)) && value.length === 0; | |
| 172 | - const isEmptyObject = (value) => !is.map(value) && !is.set(value) && is.object(value) && Object.keys(value).length === 0; | |
| 173 | - const isEmptyMapOrSet = (value) => (is.map(value) || is.set(value)) && value.size === 0; | |
| 174 | - is.empty = (value) => is.falsy(value) || isEmptyStringOrArray(value) || isEmptyObject(value) || isEmptyMapOrSet(value); | |
| 175 | - is.emptyOrWhitespace = (value) => is.empty(value) || isWhiteSpaceString(value); | |
| 176 | - const predicateOnArray = (method, predicate, args) => { | |
| 177 | - // `args` is the calling function's "arguments object". | |
| 178 | - // We have to do it this way to keep node v4 support. | |
| 179 | - // So here we convert it to an array and slice off the first item. | |
| 180 | - const values = Array.prototype.slice.call(args, 1); | |
| 181 | - if (is.function_(predicate) === false) { | |
| 182 | - throw new TypeError(`Invalid predicate: ${util.inspect(predicate)}`); | |
| 183 | - } | |
| 184 | - if (values.length === 0) { | |
| 185 | - throw new TypeError('Invalid number of values'); | |
| 186 | - } | |
| 187 | - return method.call(values, predicate); | |
| 188 | - }; | |
| 189 | - function any(predicate) { | |
| 190 | - return predicateOnArray(Array.prototype.some, predicate, arguments); | |
| 191 | - } | |
| 192 | - is.any = any; | |
| 193 | - function all(predicate) { | |
| 194 | - return predicateOnArray(Array.prototype.every, predicate, arguments); | |
| 195 | - } | |
| 196 | - is.all = all; | |
| 197 | - // tslint:enable:only-arrow-functions no-function-expression | |
| 198 | -})(is || (is = {})); | |
| 199 | -// Some few keywords are reserved, but we'll populate them for Node.js users | |
| 200 | -// See https://github.com/Microsoft/TypeScript/issues/2536 | |
| 201 | -Object.defineProperties(is, { | |
| 202 | - class: { | |
| 203 | - value: is.class_ | |
| 204 | - }, | |
| 205 | - function: { | |
| 206 | - value: is.function_ | |
| 207 | - }, | |
| 208 | - null: { | |
| 209 | - value: is.null_ | |
| 210 | - } | |
| 211 | -}); | |
| 212 | -exports.default = is; | |
| 213 | -// For CommonJS default export support | |
| 214 | -module.exports = is; | |
| 215 | -module.exports.default = is; |
node_modules/@sindresorhus/is/dist/index.js.map
| ... | ... | @@ -1 +0,0 @@ |
| 1 | -{"version":3,"file":"index.js","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAE7B,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;AAC3C,MAAM,aAAa,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAW,CAAC;AAClF,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,IAAI,CAAC;AACzE,MAAM,cAAc,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;AAEvF,YAAY,KAAU;IACrB,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC;QACpB,MAAM,CAAC,MAAM,CAAC;IACf,CAAC;IAED,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC;QACvC,MAAM,CAAC,SAAS,CAAC;IAClB,CAAC;IAED,MAAM,IAAI,GAAG,OAAO,KAAK,CAAC;IAE1B,EAAE,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC;QAC1B,MAAM,CAAC,WAAW,CAAC;IACpB,CAAC;IAED,EAAE,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;QACvB,MAAM,CAAC,QAAQ,CAAC;IACjB,CAAC;IAED,EAAE,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;QACvB,MAAM,CAAC,QAAQ,CAAC;IACjB,CAAC;IAED,EAAE,CAAC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e,MAAG,MAElB,CAAA;IAGD,aAAoB,SAAc;QACjC,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IACtE,CAAC;IAFe,MAAG,MAElB,CAAA;AAEF,CAAC,EA9KS,EAAE,KAAF,EAAE,QA8KX;AAID,MAAM,CAAC,gBAAgB,CAAC,EAAE,EAAE;IAC3B,KAAK,EAAE;QACN,KAAK,EAAE,EAAE,CAAC,MAAM;KAChB;IACD,QAAQ,EAAE;QACT,KAAK,EAAE,EAAE,CAAC,SAAS;KACnB;IACD,IAAI,EAAE;QACL,KAAK,EAAE,EAAE,CAAC,KAAK;KACf;CACD,CAAC,CAAC;AAEH,kBAAe,EAAE,CAAC;AAGlB,MAAM,CAAC,OAAO,GAAG,EAAE,CAAC;AACpB,MAAM,CAAC,OAAO,CAAC,OAAO,GAAG,EAAE,CAAC"} | |
| 2 | 0 | \ No newline at end of file |
node_modules/@sindresorhus/is/dist/source/index.d.ts
| ... | ... | @@ -1,59 +0,0 @@ |
| 1 | -/// <reference types="node" /> | |
| 2 | -declare function is(value: any): string; | |
| 3 | -declare namespace is { | |
| 4 | - const undefined: (value: any) => boolean; | |
| 5 | - const string: (value: any) => boolean; | |
| 6 | - const number: (value: any) => boolean; | |
| 7 | - const function_: (value: any) => boolean; | |
| 8 | - const null_: (value: any) => boolean; | |
| 9 | - const class_: (value: any) => any; | |
| 10 | - const boolean: (value: any) => boolean; | |
| 11 | - const symbol: (value: any) => boolean; | |
| 12 | - const array: (arg: any) => arg is any[]; | |
| 13 | - const buffer: (obj: any) => obj is Buffer; | |
| 14 | - const nullOrUndefined: (value: any) => boolean; | |
| 15 | - const object: (value: any) => boolean; | |
| 16 | - const iterable: (value: any) => boolean; | |
| 17 | - const generator: (value: any) => boolean; | |
| 18 | - const nativePromise: (value: any) => boolean; | |
| 19 | - const promise: (value: any) => boolean; | |
| 20 | - const generatorFunction: (value: any) => boolean; | |
| 21 | - const asyncFunction: (value: any) => boolean; | |
| 22 | - const regExp: (value: any) => boolean; | |
| 23 | - const date: (value: any) => boolean; | |
| 24 | - const error: (value: any) => boolean; | |
| 25 | - const map: (value: any) => boolean; | |
| 26 | - const set: (value: any) => boolean; | |
| 27 | - const weakMap: (value: any) => boolean; | |
| 28 | - const weakSet: (value: any) => boolean; | |
| 29 | - const int8Array: (value: any) => boolean; | |
| 30 | - const uint8Array: (value: any) => boolean; | |
| 31 | - const uint8ClampedArray: (value: any) => boolean; | |
| 32 | - const int16Array: (value: any) => boolean; | |
| 33 | - const uint16Array: (value: any) => boolean; | |
| 34 | - const int32Array: (value: any) => boolean; | |
| 35 | - const uint32Array: (value: any) => boolean; | |
| 36 | - const float32Array: (value: any) => boolean; | |
| 37 | - const float64Array: (value: any) => boolean; | |
| 38 | - const arrayBuffer: (value: any) => boolean; | |
| 39 | - const sharedArrayBuffer: (value: any) => boolean; | |
| 40 | - const truthy: (value: any) => boolean; | |
| 41 | - const falsy: (value: any) => boolean; | |
| 42 | - const nan: (value: any) => boolean; | |
| 43 | - const primitive: (value: any) => boolean; | |
| 44 | - const integer: (value: any) => boolean; | |
| 45 | - const safeInteger: (value: any) => boolean; | |
| 46 | - const plainObject: (value: any) => boolean; | |
| 47 | - const typedArray: (value: any) => boolean; | |
| 48 | - const arrayLike: (value: any) => boolean; | |
| 49 | - const inRange: (value: number, range: number | number[]) => boolean; | |
| 50 | - const domElement: (value: any) => boolean; | |
| 51 | - const infinite: (value: any) => boolean; | |
| 52 | - const even: (rem: number) => boolean; | |
| 53 | - const odd: (rem: number) => boolean; | |
| 54 | - const empty: (value: any) => boolean; | |
| 55 | - const emptyOrWhitespace: (value: any) => boolean; | |
| 56 | - function any(...predicate: any[]): any; | |
| 57 | - function all(...predicate: any[]): any; | |
| 58 | -} | |
| 59 | -export default is; |
node_modules/@sindresorhus/is/dist/source/index.js
| ... | ... | @@ -1,182 +0,0 @@ |
| 1 | -"use strict"; | |
| 2 | -Object.defineProperty(exports, "__esModule", { value: true }); | |
| 3 | -const util = require("util"); | |
| 4 | -const toString = Object.prototype.toString; | |
| 5 | -const getObjectType = (value) => toString.call(value).slice(8, -1); | |
| 6 | -const isOfType = (type) => (value) => typeof value === type; | |
| 7 | -const isObjectOfType = (type) => (value) => getObjectType(value) === type; | |
| 8 | -function is(value) { | |
| 9 | - if (value === null) { | |
| 10 | - return 'null'; | |
| 11 | - } | |
| 12 | - if (value === true || value === false) { | |
| 13 | - return 'boolean'; | |
| 14 | - } | |
| 15 | - const type = typeof value; | |
| 16 | - if (type === 'undefined') { | |
| 17 | - return 'undefined'; | |
| 18 | - } | |
| 19 | - if (type === 'string') { | |
| 20 | - return 'string'; | |
| 21 | - } | |
| 22 | - if (type === 'number') { | |
| 23 | - return 'number'; | |
| 24 | - } | |
| 25 | - if (type === 'symbol') { | |
| 26 | - return 'symbol'; | |
| 27 | - } | |
| 28 | - if (is.function_(value)) { | |
| 29 | - return 'Function'; | |
| 30 | - } | |
| 31 | - if (Array.isArray(value)) { | |
| 32 | - return 'Array'; | |
| 33 | - } | |
| 34 | - if (Buffer.isBuffer(value)) { | |
| 35 | - return 'Buffer'; | |
| 36 | - } | |
| 37 | - const tagType = getObjectType(value); | |
| 38 | - if (tagType) { | |
| 39 | - return tagType; | |
| 40 | - } | |
| 41 | - if (value instanceof String || value instanceof Boolean || value instanceof Number) { | |
| 42 | - throw new TypeError('Please don\'t use object wrappers for primitive types'); | |
| 43 | - } | |
| 44 | - return 'Object'; | |
| 45 | -} | |
| 46 | -(function (is) { | |
| 47 | - const isObject = (value) => typeof value === 'object'; | |
| 48 | - is.undefined = isOfType('undefined'); | |
| 49 | - is.string = isOfType('string'); | |
| 50 | - is.number = isOfType('number'); | |
| 51 | - is.function_ = isOfType('function'); | |
| 52 | - is.null_ = (value) => value === null; | |
| 53 | - is.class_ = (value) => is.function_(value) && value.toString().startsWith('class '); | |
| 54 | - is.boolean = (value) => value === true || value === false; | |
| 55 | - is.symbol = isOfType('symbol'); | |
| 56 | - is.array = Array.isArray; | |
| 57 | - is.buffer = Buffer.isBuffer; | |
| 58 | - is.nullOrUndefined = (value) => is.null_(value) || is.undefined(value); | |
| 59 | - is.object = (value) => !is.nullOrUndefined(value) && (is.function_(value) || isObject(value)); | |
| 60 | - is.iterable = (value) => !is.nullOrUndefined(value) && is.function_(value[Symbol.iterator]); | |
| 61 | - is.generator = (value) => is.iterable(value) && is.function_(value.next) && is.function_(value.throw); | |
| 62 | - is.nativePromise = isObjectOfType('Promise'); | |
| 63 | - const hasPromiseAPI = (value) => !is.null_(value) && | |
| 64 | - isObject(value) && | |
| 65 | - is.function_(value.then) && | |
| 66 | - is.function_(value.catch); | |
| 67 | - is.promise = (value) => is.nativePromise(value) || hasPromiseAPI(value); | |
| 68 | - const isFunctionOfType = (type) => (value) => is.function_(value) && is.function_(value.constructor) && value.constructor.name === type; | |
| 69 | - is.generatorFunction = isFunctionOfType('GeneratorFunction'); | |
| 70 | - is.asyncFunction = isFunctionOfType('AsyncFunction'); | |
| 71 | - is.regExp = isObjectOfType('RegExp'); | |
| 72 | - is.date = isObjectOfType('Date'); | |
| 73 | - is.error = isObjectOfType('Error'); | |
| 74 | - is.map = isObjectOfType('Map'); | |
| 75 | - is.set = isObjectOfType('Set'); | |
| 76 | - is.weakMap = isObjectOfType('WeakMap'); | |
| 77 | - is.weakSet = isObjectOfType('WeakSet'); | |
| 78 | - is.int8Array = isObjectOfType('Int8Array'); | |
| 79 | - is.uint8Array = isObjectOfType('Uint8Array'); | |
| 80 | - is.uint8ClampedArray = isObjectOfType('Uint8ClampedArray'); | |
| 81 | - is.int16Array = isObjectOfType('Int16Array'); | |
| 82 | - is.uint16Array = isObjectOfType('Uint16Array'); | |
| 83 | - is.int32Array = isObjectOfType('Int32Array'); | |
| 84 | - is.uint32Array = isObjectOfType('Uint32Array'); | |
| 85 | - is.float32Array = isObjectOfType('Float32Array'); | |
| 86 | - is.float64Array = isObjectOfType('Float64Array'); | |
| 87 | - is.arrayBuffer = isObjectOfType('ArrayBuffer'); | |
| 88 | - is.sharedArrayBuffer = isObjectOfType('SharedArrayBuffer'); | |
| 89 | - is.truthy = (value) => Boolean(value); | |
| 90 | - is.falsy = (value) => !value; | |
| 91 | - is.nan = (value) => Number.isNaN(value); | |
| 92 | - const primitiveTypes = new Set([ | |
| 93 | - 'undefined', | |
| 94 | - 'string', | |
| 95 | - 'number', | |
| 96 | - 'boolean', | |
| 97 | - 'symbol' | |
| 98 | - ]); | |
| 99 | - is.primitive = (value) => is.null_(value) || primitiveTypes.has(typeof value); | |
| 100 | - is.integer = (value) => Number.isInteger(value); | |
| 101 | - is.safeInteger = (value) => Number.isSafeInteger(value); | |
| 102 | - is.plainObject = (value) => { | |
| 103 | - let prototype; | |
| 104 | - return getObjectType(value) === 'Object' && | |
| 105 | - (prototype = Object.getPrototypeOf(value), prototype === null || | |
| 106 | - prototype === Object.getPrototypeOf({})); | |
| 107 | - }; | |
| 108 | - const typedArrayTypes = new Set([ | |
| 109 | - 'Int8Array', | |
| 110 | - 'Uint8Array', | |
| 111 | - 'Uint8ClampedArray', | |
| 112 | - 'Int16Array', | |
| 113 | - 'Uint16Array', | |
| 114 | - 'Int32Array', | |
| 115 | - 'Uint32Array', | |
| 116 | - 'Float32Array', | |
| 117 | - 'Float64Array' | |
| 118 | - ]); | |
| 119 | - is.typedArray = (value) => typedArrayTypes.has(getObjectType(value)); | |
| 120 | - const isValidLength = (value) => is.safeInteger(value) && value > -1; | |
| 121 | - is.arrayLike = (value) => !is.nullOrUndefined(value) && !is.function_(value) && isValidLength(value.length); | |
| 122 | - is.inRange = (value, range) => { | |
| 123 | - if (is.number(range)) { | |
| 124 | - return value >= Math.min(0, range) && value <= Math.max(range, 0); | |
| 125 | - } | |
| 126 | - if (is.array(range) && range.length === 2) { | |
| 127 | - return value >= Math.min.apply(null, range) && value <= Math.max.apply(null, range); | |
| 128 | - } | |
| 129 | - throw new TypeError(`Invalid range: ${util.inspect(range)}`); | |
| 130 | - }; | |
| 131 | - const NODE_TYPE_ELEMENT = 1; | |
| 132 | - const DOM_PROPERTIES_TO_CHECK = [ | |
| 133 | - 'innerHTML', | |
| 134 | - 'ownerDocument', | |
| 135 | - 'style', | |
| 136 | - 'attributes', | |
| 137 | - 'nodeValue' | |
| 138 | - ]; | |
| 139 | - is.domElement = (value) => is.object(value) && value.nodeType === NODE_TYPE_ELEMENT && is.string(value.nodeName) && | |
| 140 | - !is.plainObject(value) && DOM_PROPERTIES_TO_CHECK.every(property => property in value); | |
| 141 | - is.infinite = (value) => value === Infinity || value === -Infinity; | |
| 142 | - const isAbsoluteMod2 = (value) => (rem) => is.integer(rem) && Math.abs(rem % 2) === value; | |
| 143 | - is.even = isAbsoluteMod2(0); | |
| 144 | - is.odd = isAbsoluteMod2(1); | |
| 145 | - const isWhiteSpaceString = (value) => is.string(value) && /\S/.test(value) === false; | |
| 146 | - const isEmptyStringOrArray = (value) => (is.string(value) || is.array(value)) && value.length === 0; | |
| 147 | - const isEmptyObject = (value) => !is.map(value) && !is.set(value) && is.object(value) && Object.keys(value).length === 0; | |
| 148 | - const isEmptyMapOrSet = (value) => (is.map(value) || is.set(value)) && value.size === 0; | |
| 149 | - is.empty = (value) => is.falsy(value) || isEmptyStringOrArray(value) || isEmptyObject(value) || isEmptyMapOrSet(value); | |
| 150 | - is.emptyOrWhitespace = (value) => is.empty(value) || isWhiteSpaceString(value); | |
| 151 | - const predicateOnArray = (method, predicate, args) => { | |
| 152 | - const values = Array.prototype.slice.call(args, 1); | |
| 153 | - if (is.function_(predicate) === false) { | |
| 154 | - throw new TypeError(`Invalid predicate: ${util.inspect(predicate)}`); | |
| 155 | - } | |
| 156 | - if (values.length === 0) { | |
| 157 | - throw new TypeError('Invalid number of values'); | |
| 158 | - } | |
| 159 | - return method.call(values, predicate); | |
| 160 | - }; | |
| 161 | - function any(predicate) { | |
| 162 | - return predicateOnArray(Array.prototype.some, predicate, arguments); | |
| 163 | - } | |
| 164 | - is.any = any; | |
| 165 | - function all(predicate) { | |
| 166 | - return predicateOnArray(Array.prototype.every, predicate, arguments); | |
| 167 | - } | |
| 168 | - is.all = all; | |
| 169 | -})(is || (is = {})); | |
| 170 | -Object.defineProperties(is, { | |
| 171 | - class: { | |
| 172 | - value: is.class_ | |
| 173 | - }, | |
| 174 | - function: { | |
| 175 | - value: is.function_ | |
| 176 | - }, | |
| 177 | - null: { | |
| 178 | - value: is.null_ | |
| 179 | - } | |
| 180 | -}); | |
| 181 | -exports.default = is; | |
| 182 | -//# sourceMappingURL=index.js.map | |
| 183 | 0 | \ No newline at end of file |
node_modules/@sindresorhus/is/dist/source/index.js.map
| ... | ... | @@ -1 +0,0 @@ |
| 1 | -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/index.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAE7B,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;AAC3C,MAAM,aAAa,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAW,CAAC;AAClF,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,IAAI,CAAC;AACzE,MAAM,cAAc,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;AAEvF,YAAY,KAAU;IACrB,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC;QACpB,MAAM,CAAC,MAAM,CAAC;IACf,CAAC;IAED,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC;QACvC,MAAM,CAAC,SAAS,CAAC;IAClB,CAAC;IAED,MAAM,IAAI,GAAG,OAAO,KAAK,C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AAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;YACzB,MAAM,IAAI,SAAS,CAAC,0BAA0B,CAAC,CAAC;QACjD,CAAC;QAED,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACvC,CAAC,CAAC;IAMF,aAAoB,SAAc;QACjC,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IACrE,CAAC;IAFe,MAAG,MAElB,CAAA;IAGD,aAAoB,SAAc;QACjC,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IACtE,CAAC;IAFe,MAAG,MAElB,CAAA;AAEF,CAAC,EA9KS,EAAE,KAAF,EAAE,QA8KX;AAID,MAAM,CAAC,gBAAgB,CAAC,EAAE,EAAE;IAC3B,KAAK,EAAE;QACN,KAAK,EAAE,EAAE,CAAC,MAAM;KAChB;IACD,QAAQ,EAAE;QACT,KAAK,EAAE,EAAE,CAAC,SAAS;KACnB;IACD,IAAI,EAAE;QACL,KAAK,EAAE,EAAE,CAAC,KAAK;KACf;CACD,CAAC,CAAC;AAEH,kBAAe,EAAE,CAAC"} | |
| 2 | 0 | \ No newline at end of file |
node_modules/@sindresorhus/is/dist/source/tests/test.d.ts
node_modules/@sindresorhus/is/dist/source/tests/test.js
| ... | ... | @@ -1,622 +0,0 @@ |
| 1 | -"use strict"; | |
| 2 | -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | |
| 3 | - return new (P || (P = Promise))(function (resolve, reject) { | |
| 4 | - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | |
| 5 | - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | |
| 6 | - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | |
| 7 | - step((generator = generator.apply(thisArg, _arguments || [])).next()); | |
| 8 | - }); | |
| 9 | -}; | |
| 10 | -Object.defineProperty(exports, "__esModule", { value: true }); | |
| 11 | -const util = require("util"); | |
| 12 | -const ava_1 = require("ava"); | |
| 13 | -const jsdom_1 = require("jsdom"); | |
| 14 | -const __1 = require(".."); | |
| 15 | -const isNode8orHigher = Number(process.versions.node.split('.')[0]) >= 8; | |
| 16 | -class ErrorSubclassFixture extends Error { | |
| 17 | -} | |
| 18 | -const document = jsdom_1.jsdom(); | |
| 19 | -const createDomElement = (el) => document.createElement(el); | |
| 20 | -const types = new Map([ | |
| 21 | - ['undefined', { | |
| 22 | - is: __1.default.undefined, | |
| 23 | - fixtures: [ | |
| 24 | - undefined | |
| 25 | - ] | |
| 26 | - }], | |
| 27 | - ['null', { | |
| 28 | - is: __1.default.null_, | |
| 29 | - fixtures: [ | |
| 30 | - null | |
| 31 | - ] | |
| 32 | - }], | |
| 33 | - ['string', { | |
| 34 | - is: __1.default.string, | |
| 35 | - fixtures: [ | |
| 36 | - '๐ฆ', | |
| 37 | - 'hello world', | |
| 38 | - '' | |
| 39 | - ] | |
| 40 | - }], | |
| 41 | - ['number', { | |
| 42 | - is: __1.default.number, | |
| 43 | - fixtures: [ | |
| 44 | - 6, | |
| 45 | - 1.4, | |
| 46 | - 0, | |
| 47 | - -0, | |
| 48 | - Infinity, | |
| 49 | - -Infinity | |
| 50 | - ] | |
| 51 | - }], | |
| 52 | - ['boolean', { | |
| 53 | - is: __1.default.boolean, | |
| 54 | - fixtures: [ | |
| 55 | - true, false | |
| 56 | - ] | |
| 57 | - }], | |
| 58 | - ['symbol', { | |
| 59 | - is: __1.default.symbol, | |
| 60 | - fixtures: [ | |
| 61 | - Symbol('๐ฆ') | |
| 62 | - ] | |
| 63 | - }], | |
| 64 | - ['array', { | |
| 65 | - is: __1.default.array, | |
| 66 | - fixtures: [ | |
| 67 | - [1, 2], | |
| 68 | - new Array(2) | |
| 69 | - ] | |
| 70 | - }], | |
| 71 | - ['function', { | |
| 72 | - is: __1.default.function_, | |
| 73 | - fixtures: [ | |
| 74 | - function foo() { }, | |
| 75 | - function () { }, | |
| 76 | - () => { }, | |
| 77 | - function () { | |
| 78 | - return __awaiter(this, void 0, void 0, function* () { }); | |
| 79 | - }, | |
| 80 | - function* () { } | |
| 81 | - ] | |
| 82 | - }], | |
| 83 | - ['buffer', { | |
| 84 | - is: __1.default.buffer, | |
| 85 | - fixtures: [ | |
| 86 | - Buffer.from('๐ฆ') | |
| 87 | - ] | |
| 88 | - }], | |
| 89 | - ['object', { | |
| 90 | - is: __1.default.object, | |
| 91 | - fixtures: [ | |
| 92 | - { x: 1 }, | |
| 93 | - Object.create({ x: 1 }) | |
| 94 | - ] | |
| 95 | - }], | |
| 96 | - ['regExp', { | |
| 97 | - is: __1.default.regExp, | |
| 98 | - fixtures: [ | |
| 99 | - /\w/, | |
| 100 | - new RegExp('\\w') | |
| 101 | - ] | |
| 102 | - }], | |
| 103 | - ['date', { | |
| 104 | - is: __1.default.date, | |
| 105 | - fixtures: [ | |
| 106 | - new Date() | |
| 107 | - ] | |
| 108 | - }], | |
| 109 | - ['error', { | |
| 110 | - is: __1.default.error, | |
| 111 | - fixtures: [ | |
| 112 | - new Error('๐ฆ'), | |
| 113 | - new ErrorSubclassFixture() | |
| 114 | - ] | |
| 115 | - }], | |
| 116 | - ['nativePromise', { | |
| 117 | - is: __1.default.nativePromise, | |
| 118 | - fixtures: [ | |
| 119 | - Promise.resolve(), | |
| 120 | - ] | |
| 121 | - }], | |
| 122 | - ['promise', { | |
| 123 | - is: __1.default.promise, | |
| 124 | - fixtures: [ | |
| 125 | - { then() { }, catch() { } } | |
| 126 | - ] | |
| 127 | - }], | |
| 128 | - ['generator', { | |
| 129 | - is: __1.default.generator, | |
| 130 | - fixtures: [ | |
| 131 | - (function* () { yield 4; })() | |
| 132 | - ] | |
| 133 | - }], | |
| 134 | - ['generatorFunction', { | |
| 135 | - is: __1.default.generatorFunction, | |
| 136 | - fixtures: [ | |
| 137 | - function* () { yield 4; } | |
| 138 | - ] | |
| 139 | - }], | |
| 140 | - ['asyncFunction', { | |
| 141 | - is: __1.default.asyncFunction, | |
| 142 | - fixtures: [ | |
| 143 | - function () { | |
| 144 | - return __awaiter(this, void 0, void 0, function* () { }); | |
| 145 | - }, | |
| 146 | - () => __awaiter(this, void 0, void 0, function* () { }) | |
| 147 | - ] | |
| 148 | - }], | |
| 149 | - ['map', { | |
| 150 | - is: __1.default.map, | |
| 151 | - fixtures: [ | |
| 152 | - new Map() | |
| 153 | - ] | |
| 154 | - }], | |
| 155 | - ['set', { | |
| 156 | - is: __1.default.set, | |
| 157 | - fixtures: [ | |
| 158 | - new Set() | |
| 159 | - ] | |
| 160 | - }], | |
| 161 | - ['weakSet', { | |
| 162 | - is: __1.default.weakSet, | |
| 163 | - fixtures: [ | |
| 164 | - new WeakSet() | |
| 165 | - ] | |
| 166 | - }], | |
| 167 | - ['weakMap', { | |
| 168 | - is: __1.default.weakMap, | |
| 169 | - fixtures: [ | |
| 170 | - new WeakMap() | |
| 171 | - ] | |
| 172 | - }], | |
| 173 | - ['int8Array', { | |
| 174 | - is: __1.default.int8Array, | |
| 175 | - fixtures: [ | |
| 176 | - new Int8Array(0) | |
| 177 | - ] | |
| 178 | - }], | |
| 179 | - ['uint8Array', { | |
| 180 | - is: __1.default.uint8Array, | |
| 181 | - fixtures: [ | |
| 182 | - new Uint8Array(0) | |
| 183 | - ] | |
| 184 | - }], | |
| 185 | - ['uint8ClampedArray', { | |
| 186 | - is: __1.default.uint8ClampedArray, | |
| 187 | - fixtures: [ | |
| 188 | - new Uint8ClampedArray(0) | |
| 189 | - ] | |
| 190 | - }], | |
| 191 | - ['int16Array', { | |
| 192 | - is: __1.default.int16Array, | |
| 193 | - fixtures: [ | |
| 194 | - new Int16Array(0) | |
| 195 | - ] | |
| 196 | - }], | |
| 197 | - ['uint16Array', { | |
| 198 | - is: __1.default.uint16Array, | |
| 199 | - fixtures: [ | |
| 200 | - new Uint16Array(0) | |
| 201 | - ] | |
| 202 | - }], | |
| 203 | - ['int32Array', { | |
| 204 | - is: __1.default.int32Array, | |
| 205 | - fixtures: [ | |
| 206 | - new Int32Array(0) | |
| 207 | - ] | |
| 208 | - }], | |
| 209 | - ['uint32Array', { | |
| 210 | - is: __1.default.uint32Array, | |
| 211 | - fixtures: [ | |
| 212 | - new Uint32Array(0) | |
| 213 | - ] | |
| 214 | - }], | |
| 215 | - ['float32Array', { | |
| 216 | - is: __1.default.float32Array, | |
| 217 | - fixtures: [ | |
| 218 | - new Float32Array(0) | |
| 219 | - ] | |
| 220 | - }], | |
| 221 | - ['float64Array', { | |
| 222 | - is: __1.default.float64Array, | |
| 223 | - fixtures: [ | |
| 224 | - new Float64Array(0) | |
| 225 | - ] | |
| 226 | - }], | |
| 227 | - ['arrayBuffer', { | |
| 228 | - is: __1.default.arrayBuffer, | |
| 229 | - fixtures: [ | |
| 230 | - new ArrayBuffer(10) | |
| 231 | - ] | |
| 232 | - }], | |
| 233 | - ['nan', { | |
| 234 | - is: __1.default.nan, | |
| 235 | - fixtures: [ | |
| 236 | - NaN, | |
| 237 | - Number.NaN | |
| 238 | - ] | |
| 239 | - }], | |
| 240 | - ['nullOrUndefined', { | |
| 241 | - is: __1.default.nullOrUndefined, | |
| 242 | - fixtures: [ | |
| 243 | - null, | |
| 244 | - undefined | |
| 245 | - ] | |
| 246 | - }], | |
| 247 | - ['plainObject', { | |
| 248 | - is: __1.default.plainObject, | |
| 249 | - fixtures: [ | |
| 250 | - { x: 1 }, | |
| 251 | - Object.create(null), | |
| 252 | - new Object() | |
| 253 | - ] | |
| 254 | - }], | |
| 255 | - ['integer', { | |
| 256 | - is: __1.default.integer, | |
| 257 | - fixtures: [ | |
| 258 | - 6 | |
| 259 | - ] | |
| 260 | - }], | |
| 261 | - ['safeInteger', { | |
| 262 | - is: __1.default.safeInteger, | |
| 263 | - fixtures: [ | |
| 264 | - Math.pow(2, 53) - 1, | |
| 265 | - -Math.pow(2, 53) + 1 | |
| 266 | - ] | |
| 267 | - }], | |
| 268 | - ['domElement', { | |
| 269 | - is: __1.default.domElement, | |
| 270 | - fixtures: [ | |
| 271 | - 'div', | |
| 272 | - 'input', | |
| 273 | - 'span', | |
| 274 | - 'img', | |
| 275 | - 'canvas', | |
| 276 | - 'script' | |
| 277 | - ].map(createDomElement) | |
| 278 | - } | |
| 279 | - ], ['non-domElements', { | |
| 280 | - is: value => !__1.default.domElement(value), | |
| 281 | - fixtures: [ | |
| 282 | - document.createTextNode('data'), | |
| 283 | - document.createProcessingInstruction('xml-stylesheet', 'href="mycss.css" type="text/css"'), | |
| 284 | - document.createComment('This is a comment'), | |
| 285 | - document, | |
| 286 | - document.implementation.createDocumentType('svg:svg', '-//W3C//DTD SVG 1.1//EN', 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'), | |
| 287 | - document.createDocumentFragment() | |
| 288 | - ] | |
| 289 | - }], | |
| 290 | - ['infinite', { | |
| 291 | - is: __1.default.infinite, | |
| 292 | - fixtures: [ | |
| 293 | - Infinity, | |
| 294 | - -Infinity | |
| 295 | - ] | |
| 296 | - }] | |
| 297 | -]); | |
| 298 | -const testType = (t, type, exclude) => { | |
| 299 | - const testData = types.get(type); | |
| 300 | - if (testData === undefined) { | |
| 301 | - t.fail(`is.${type} not defined`); | |
| 302 | - return; | |
| 303 | - } | |
| 304 | - const { is } = testData; | |
| 305 | - for (const [key, { fixtures }] of types) { | |
| 306 | - if (exclude && exclude.indexOf(key) !== -1) { | |
| 307 | - continue; | |
| 308 | - } | |
| 309 | - const assert = key === type ? t.true.bind(t) : t.false.bind(t); | |
| 310 | - for (const fixture of fixtures) { | |
| 311 | - assert(is(fixture), `Value: ${util.inspect(fixture)}`); | |
| 312 | - } | |
| 313 | - } | |
| 314 | -}; | |
| 315 | -ava_1.default('is', t => { | |
| 316 | - t.is(__1.default(null), 'null'); | |
| 317 | - t.is(__1.default(undefined), 'undefined'); | |
| 318 | -}); | |
| 319 | -ava_1.default('is.undefined', t => { | |
| 320 | - testType(t, 'undefined', ['nullOrUndefined']); | |
| 321 | -}); | |
| 322 | -ava_1.default('is.null', t => { | |
| 323 | - testType(t, 'null', ['nullOrUndefined']); | |
| 324 | -}); | |
| 325 | -ava_1.default('is.string', t => { | |
| 326 | - testType(t, 'string'); | |
| 327 | -}); | |
| 328 | -ava_1.default('is.number', t => { | |
| 329 | - testType(t, 'number', ['nan', 'integer', 'safeInteger', 'infinite']); | |
| 330 | -}); | |
| 331 | -ava_1.default('is.boolean', t => { | |
| 332 | - testType(t, 'boolean'); | |
| 333 | -}); | |
| 334 | -ava_1.default('is.symbol', t => { | |
| 335 | - testType(t, 'symbol'); | |
| 336 | -}); | |
| 337 | -ava_1.default('is.array', t => { | |
| 338 | - testType(t, 'array'); | |
| 339 | -}); | |
| 340 | -ava_1.default('is.function', t => { | |
| 341 | - testType(t, 'function', ['generatorFunction', 'asyncFunction']); | |
| 342 | -}); | |
| 343 | -ava_1.default('is.buffer', t => { | |
| 344 | - testType(t, 'buffer'); | |
| 345 | -}); | |
| 346 | -ava_1.default('is.object', t => { | |
| 347 | - const testData = types.get('object'); | |
| 348 | - if (testData === undefined) { | |
| 349 | - t.fail('is.object not defined'); | |
| 350 | - return; | |
| 351 | - } | |
| 352 | - for (const el of testData.fixtures) { | |
| 353 | - t.true(__1.default.object(el)); | |
| 354 | - } | |
| 355 | -}); | |
| 356 | -ava_1.default('is.regExp', t => { | |
| 357 | - testType(t, 'regExp'); | |
| 358 | -}); | |
| 359 | -ava_1.default('is.date', t => { | |
| 360 | - testType(t, 'date'); | |
| 361 | -}); | |
| 362 | -ava_1.default('is.error', t => { | |
| 363 | - testType(t, 'error'); | |
| 364 | -}); | |
| 365 | -if (isNode8orHigher) { | |
| 366 | - ava_1.default('is.nativePromise', t => { | |
| 367 | - testType(t, 'nativePromise'); | |
| 368 | - }); | |
| 369 | - ava_1.default('is.promise', t => { | |
| 370 | - testType(t, 'promise', ['nativePromise']); | |
| 371 | - }); | |
| 372 | -} | |
| 373 | -ava_1.default('is.generator', t => { | |
| 374 | - testType(t, 'generator'); | |
| 375 | -}); | |
| 376 | -ava_1.default('is.generatorFunction', t => { | |
| 377 | - testType(t, 'generatorFunction', ['function']); | |
| 378 | -}); | |
| 379 | -ava_1.default('is.map', t => { | |
| 380 | - testType(t, 'map'); | |
| 381 | -}); | |
| 382 | -ava_1.default('is.set', t => { | |
| 383 | - testType(t, 'set'); | |
| 384 | -}); | |
| 385 | -ava_1.default('is.weakMap', t => { | |
| 386 | - testType(t, 'weakMap'); | |
| 387 | -}); | |
| 388 | -ava_1.default('is.weakSet', t => { | |
| 389 | - testType(t, 'weakSet'); | |
| 390 | -}); | |
| 391 | -ava_1.default('is.int8Array', t => { | |
| 392 | - testType(t, 'int8Array'); | |
| 393 | -}); | |
| 394 | -ava_1.default('is.uint8Array', t => { | |
| 395 | - testType(t, 'uint8Array', ['buffer']); | |
| 396 | -}); | |
| 397 | -ava_1.default('is.uint8ClampedArray', t => { | |
| 398 | - testType(t, 'uint8ClampedArray'); | |
| 399 | -}); | |
| 400 | -ava_1.default('is.int16Array', t => { | |
| 401 | - testType(t, 'int16Array'); | |
| 402 | -}); | |
| 403 | -ava_1.default('is.uint16Array', t => { | |
| 404 | - testType(t, 'uint16Array'); | |
| 405 | -}); | |
| 406 | -ava_1.default('is.int32Array', t => { | |
| 407 | - testType(t, 'int32Array'); | |
| 408 | -}); | |
| 409 | -ava_1.default('is.uint32Array', t => { | |
| 410 | - testType(t, 'uint32Array'); | |
| 411 | -}); | |
| 412 | -ava_1.default('is.float32Array', t => { | |
| 413 | - testType(t, 'float32Array'); | |
| 414 | -}); | |
| 415 | -ava_1.default('is.float64Array', t => { | |
| 416 | - testType(t, 'float64Array'); | |
| 417 | -}); | |
| 418 | -ava_1.default('is.arrayBuffer', t => { | |
| 419 | - testType(t, 'arrayBuffer'); | |
| 420 | -}); | |
| 421 | -ava_1.default('is.dataView', t => { | |
| 422 | - testType(t, 'arrayBuffer'); | |
| 423 | -}); | |
| 424 | -ava_1.default('is.truthy', t => { | |
| 425 | - t.true(__1.default.truthy('unicorn')); | |
| 426 | - t.true(__1.default.truthy('๐ฆ')); | |
| 427 | - t.true(__1.default.truthy(new Set())); | |
| 428 | - t.true(__1.default.truthy(Symbol('๐ฆ'))); | |
| 429 | - t.true(__1.default.truthy(true)); | |
| 430 | -}); | |
| 431 | -ava_1.default('is.falsy', t => { | |
| 432 | - t.true(__1.default.falsy(false)); | |
| 433 | - t.true(__1.default.falsy(0)); | |
| 434 | - t.true(__1.default.falsy('')); | |
| 435 | - t.true(__1.default.falsy(null)); | |
| 436 | - t.true(__1.default.falsy(undefined)); | |
| 437 | - t.true(__1.default.falsy(NaN)); | |
| 438 | -}); | |
| 439 | -ava_1.default('is.nan', t => { | |
| 440 | - testType(t, 'nan'); | |
| 441 | -}); | |
| 442 | -ava_1.default('is.nullOrUndefined', t => { | |
| 443 | - testType(t, 'nullOrUndefined', ['undefined', 'null']); | |
| 444 | -}); | |
| 445 | -ava_1.default('is.primitive', t => { | |
| 446 | - const primitives = [ | |
| 447 | - undefined, | |
| 448 | - null, | |
| 449 | - '๐ฆ', | |
| 450 | - 6, | |
| 451 | - Infinity, | |
| 452 | - -Infinity, | |
| 453 | - true, | |
| 454 | - false, | |
| 455 | - Symbol('๐ฆ') | |
| 456 | - ]; | |
| 457 | - for (const el of primitives) { | |
| 458 | - t.true(__1.default.primitive(el)); | |
| 459 | - } | |
| 460 | -}); | |
| 461 | -ava_1.default('is.integer', t => { | |
| 462 | - testType(t, 'integer', ['number', 'safeInteger']); | |
| 463 | - t.false(__1.default.integer(1.4)); | |
| 464 | -}); | |
| 465 | -ava_1.default('is.safeInteger', t => { | |
| 466 | - testType(t, 'safeInteger', ['number', 'integer']); | |
| 467 | - t.false(__1.default.safeInteger(Math.pow(2, 53))); | |
| 468 | - t.false(__1.default.safeInteger(-Math.pow(2, 53))); | |
| 469 | -}); | |
| 470 | -ava_1.default('is.plainObject', t => { | |
| 471 | - testType(t, 'plainObject', ['object', 'promise']); | |
| 472 | -}); | |
| 473 | -ava_1.default('is.iterable', t => { | |
| 474 | - t.true(__1.default.iterable('')); | |
| 475 | - t.true(__1.default.iterable([])); | |
| 476 | - t.true(__1.default.iterable(new Map())); | |
| 477 | - t.false(__1.default.iterable(null)); | |
| 478 | - t.false(__1.default.iterable(undefined)); | |
| 479 | - t.false(__1.default.iterable(0)); | |
| 480 | - t.false(__1.default.iterable(NaN)); | |
| 481 | - t.false(__1.default.iterable(Infinity)); | |
| 482 | - t.false(__1.default.iterable({})); | |
| 483 | -}); | |
| 484 | -ava_1.default('is.class', t => { | |
| 485 | - class Foo { | |
| 486 | - } | |
| 487 | - const classDeclarations = [ | |
| 488 | - Foo, | |
| 489 | - class Bar extends Foo { | |
| 490 | - } | |
| 491 | - ]; | |
| 492 | - for (const x of classDeclarations) { | |
| 493 | - t.true(__1.default.class_(x)); | |
| 494 | - } | |
| 495 | -}); | |
| 496 | -ava_1.default('is.typedArray', t => { | |
| 497 | - const typedArrays = [ | |
| 498 | - new Int8Array(0), | |
| 499 | - new Uint8Array(0), | |
| 500 | - new Uint8ClampedArray(0), | |
| 501 | - new Uint16Array(0), | |
| 502 | - new Int32Array(0), | |
| 503 | - new Uint32Array(0), | |
| 504 | - new Float32Array(0), | |
| 505 | - new Float64Array(0) | |
| 506 | - ]; | |
| 507 | - for (const el of typedArrays) { | |
| 508 | - t.true(__1.default.typedArray(el)); | |
| 509 | - } | |
| 510 | - t.false(__1.default.typedArray(new ArrayBuffer(1))); | |
| 511 | - t.false(__1.default.typedArray([])); | |
| 512 | - t.false(__1.default.typedArray({})); | |
| 513 | -}); | |
| 514 | -ava_1.default('is.arrayLike', t => { | |
| 515 | - (() => { | |
| 516 | - t.true(__1.default.arrayLike(arguments)); | |
| 517 | - })(); | |
| 518 | - t.true(__1.default.arrayLike([])); | |
| 519 | - t.true(__1.default.arrayLike('unicorn')); | |
| 520 | - t.false(__1.default.arrayLike({})); | |
| 521 | - t.false(__1.default.arrayLike(() => { })); | |
| 522 | - t.false(__1.default.arrayLike(new Map())); | |
| 523 | -}); | |
| 524 | -ava_1.default('is.inRange', t => { | |
| 525 | - const x = 3; | |
| 526 | - t.true(__1.default.inRange(x, [0, 5])); | |
| 527 | - t.true(__1.default.inRange(x, [5, 0])); | |
| 528 | - t.true(__1.default.inRange(x, [-5, 5])); | |
| 529 | - t.true(__1.default.inRange(x, [5, -5])); | |
| 530 | - t.false(__1.default.inRange(x, [4, 8])); | |
| 531 | - t.true(__1.default.inRange(-7, [-5, -10])); | |
| 532 | - t.true(__1.default.inRange(-5, [-5, -10])); | |
| 533 | - t.true(__1.default.inRange(-10, [-5, -10])); | |
| 534 | - t.true(__1.default.inRange(x, 10)); | |
| 535 | - t.true(__1.default.inRange(0, 0)); | |
| 536 | - t.true(__1.default.inRange(-2, -3)); | |
| 537 | - t.false(__1.default.inRange(x, 2)); | |
| 538 | - t.false(__1.default.inRange(-3, -2)); | |
| 539 | - t.throws(() => { | |
| 540 | - __1.default.inRange(0, []); | |
| 541 | - }); | |
| 542 | - t.throws(() => { | |
| 543 | - __1.default.inRange(0, [5]); | |
| 544 | - }); | |
| 545 | - t.throws(() => { | |
| 546 | - __1.default.inRange(0, [1, 2, 3]); | |
| 547 | - }); | |
| 548 | -}); | |
| 549 | -ava_1.default('is.domElement', t => { | |
| 550 | - testType(t, 'domElement'); | |
| 551 | - t.false(__1.default.domElement({ nodeType: 1, nodeName: 'div' })); | |
| 552 | -}); | |
| 553 | -ava_1.default('is.infinite', t => { | |
| 554 | - testType(t, 'infinite', ['number']); | |
| 555 | -}); | |
| 556 | -ava_1.default('is.even', t => { | |
| 557 | - for (const el of [-6, 2, 4]) { | |
| 558 | - t.true(__1.default.even(el)); | |
| 559 | - } | |
| 560 | - for (const el of [-3, 1, 5]) { | |
| 561 | - t.false(__1.default.even(el)); | |
| 562 | - } | |
| 563 | -}); | |
| 564 | -ava_1.default('is.odd', t => { | |
| 565 | - for (const el of [-5, 7, 13]) { | |
| 566 | - t.true(__1.default.odd(el)); | |
| 567 | - } | |
| 568 | - for (const el of [-8, 8, 10]) { | |
| 569 | - t.false(__1.default.odd(el)); | |
| 570 | - } | |
| 571 | -}); | |
| 572 | -ava_1.default('is.empty', t => { | |
| 573 | - t.true(__1.default.empty(null)); | |
| 574 | - t.true(__1.default.empty(undefined)); | |
| 575 | - t.true(__1.default.empty(false)); | |
| 576 | - t.false(__1.default.empty(true)); | |
| 577 | - t.true(__1.default.empty('')); | |
| 578 | - t.false(__1.default.empty('๐ฆ')); | |
| 579 | - t.true(__1.default.empty([])); | |
| 580 | - t.false(__1.default.empty(['๐ฆ'])); | |
| 581 | - t.true(__1.default.empty({})); | |
| 582 | - t.false(__1.default.empty({ unicorn: '๐ฆ' })); | |
| 583 | - const tempMap = new Map(); | |
| 584 | - t.true(__1.default.empty(tempMap)); | |
| 585 | - tempMap.set('unicorn', '๐ฆ'); | |
| 586 | - t.false(__1.default.empty(tempMap)); | |
| 587 | - const tempSet = new Set(); | |
| 588 | - t.true(__1.default.empty(tempSet)); | |
| 589 | - tempSet.add(1); | |
| 590 | - t.false(__1.default.empty(tempSet)); | |
| 591 | -}); | |
| 592 | -ava_1.default('is.emptyOrWhitespace', t => { | |
| 593 | - t.true(__1.default.emptyOrWhitespace('')); | |
| 594 | - t.true(__1.default.emptyOrWhitespace(' ')); | |
| 595 | - t.false(__1.default.emptyOrWhitespace('๐ฆ')); | |
| 596 | - t.false(__1.default.emptyOrWhitespace('unicorn')); | |
| 597 | -}); | |
| 598 | -ava_1.default('is.any', t => { | |
| 599 | - t.true(__1.default.any(__1.default.string, {}, true, '๐ฆ')); | |
| 600 | - t.true(__1.default.any(__1.default.object, false, {}, 'unicorns')); | |
| 601 | - t.false(__1.default.any(__1.default.boolean, '๐ฆ', [], 3)); | |
| 602 | - t.false(__1.default.any(__1.default.integer, true, 'lol', {})); | |
| 603 | - t.throws(() => { | |
| 604 | - __1.default.any(null, true); | |
| 605 | - }); | |
| 606 | - t.throws(() => { | |
| 607 | - __1.default.any(__1.default.string); | |
| 608 | - }); | |
| 609 | -}); | |
| 610 | -ava_1.default('is.all', t => { | |
| 611 | - t.true(__1.default.all(__1.default.object, {}, new Set(), new Map())); | |
| 612 | - t.true(__1.default.all(__1.default.boolean, true, false)); | |
| 613 | - t.false(__1.default.all(__1.default.string, '๐ฆ', [])); | |
| 614 | - t.false(__1.default.all(__1.default.set, new Map(), {})); | |
| 615 | - t.throws(() => { | |
| 616 | - __1.default.all(null, true); | |
| 617 | - }); | |
| 618 | - t.throws(() => { | |
| 619 | - __1.default.all(__1.default.string); | |
| 620 | - }); | |
| 621 | -}); | |
| 622 | -//# sourceMappingURL=test.js.map | |
| 623 | 0 | \ No newline at end of file |
node_modules/@sindresorhus/is/dist/source/tests/test.js.map
| ... | ... | @@ -1 +0,0 @@ |
| 1 | -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../source/tests/test.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,6BAA6B;AAC7B,6BAA+C;AAC/C,iCAA4B;AAC5B,0BAAmB;AAEnB,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAKzE,0BAA2B,SAAQ,KAAK;CAAG;AAE3C,MAAM,QAAQ,GAAG,aAAK,EAAE,CAAC;AACzB,MAAM,gBAAgB,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;AAOpE,MAAM,KAAK,GAAG,IAAI,GAAG,CAAe;IACnC,CAAC,WAAW,EAAE;YACb,EAAE,EAAE,WAAC,CAAC,SAAS;YACf,QAAQ,EAAE;gBACT,SAAS;aACT;SACD,CAAC;IACF,CAAC,MAAM,EAAE;YACR,EAAE,EAAE,WAAC,CAAC,KAAK;YACX,QAAQ,EAAE;gBACT,I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AC,GAAG,CAAC,WAAC,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"} | |
| 2 | 0 | \ No newline at end of file |
node_modules/@sindresorhus/is/license
| ... | ... | @@ -1,9 +0,0 @@ |
| 1 | -MIT License | |
| 2 | - | |
| 3 | -Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) | |
| 4 | - | |
| 5 | -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: | |
| 6 | - | |
| 7 | -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
| 8 | - | |
| 9 | -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. |
node_modules/@sindresorhus/is/package.json
| ... | ... | @@ -1,95 +0,0 @@ |
| 1 | -{ | |
| 2 | - "_from": "@sindresorhus/is@^0.7.0", | |
| 3 | - "_id": "@sindresorhus/is@0.7.0", | |
| 4 | - "_inBundle": false, | |
| 5 | - "_integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==", | |
| 6 | - "_location": "/@sindresorhus/is", | |
| 7 | - "_phantomChildren": {}, | |
| 8 | - "_requested": { | |
| 9 | - "type": "range", | |
| 10 | - "registry": true, | |
| 11 | - "raw": "@sindresorhus/is@^0.7.0", | |
| 12 | - "name": "@sindresorhus/is", | |
| 13 | - "escapedName": "@sindresorhus%2fis", | |
| 14 | - "scope": "@sindresorhus", | |
| 15 | - "rawSpec": "^0.7.0", | |
| 16 | - "saveSpec": null, | |
| 17 | - "fetchSpec": "^0.7.0" | |
| 18 | - }, | |
| 19 | - "_requiredBy": [ | |
| 20 | - "/p-series" | |
| 21 | - ], | |
| 22 | - "_resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz", | |
| 23 | - "_shasum": "9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd", | |
| 24 | - "_spec": "@sindresorhus/is@^0.7.0", | |
| 25 | - "_where": "C:\\Users\\admin\\Documents\\express-project\\node_modules\\p-series", | |
| 26 | - "author": { | |
| 27 | - "name": "Sindre Sorhus", | |
| 28 | - "email": "sindresorhus@gmail.com", | |
| 29 | - "url": "sindresorhus.com" | |
| 30 | - }, | |
| 31 | - "bugs": { | |
| 32 | - "url": "https://github.com/sindresorhus/is/issues" | |
| 33 | - }, | |
| 34 | - "bundleDependencies": false, | |
| 35 | - "deprecated": false, | |
| 36 | - "description": "Type check values: `is.string('๐ฆ') //=> true`", | |
| 37 | - "devDependencies": { | |
| 38 | - "@types/jsdom": "^2.0.31", | |
| 39 | - "@types/node": "^8.0.47", | |
| 40 | - "@types/tempy": "^0.1.0", | |
| 41 | - "ava": "*", | |
| 42 | - "del-cli": "^1.1.0", | |
| 43 | - "jsdom": "^9.12.0", | |
| 44 | - "tempy": "^0.2.1", | |
| 45 | - "tslint": "^5.8.0", | |
| 46 | - "tslint-xo": "^0.3.0", | |
| 47 | - "typescript": "^2.6.1" | |
| 48 | - }, | |
| 49 | - "engines": { | |
| 50 | - "node": ">=4" | |
| 51 | - }, | |
| 52 | - "files": [ | |
| 53 | - "dist" | |
| 54 | - ], | |
| 55 | - "homepage": "https://github.com/sindresorhus/is#readme", | |
| 56 | - "keywords": [ | |
| 57 | - "type", | |
| 58 | - "types", | |
| 59 | - "is", | |
| 60 | - "check", | |
| 61 | - "checking", | |
| 62 | - "validate", | |
| 63 | - "validation", | |
| 64 | - "utility", | |
| 65 | - "util", | |
| 66 | - "typeof", | |
| 67 | - "instanceof", | |
| 68 | - "object", | |
| 69 | - "assert", | |
| 70 | - "assertion", | |
| 71 | - "test", | |
| 72 | - "kind", | |
| 73 | - "primitive", | |
| 74 | - "verify", | |
| 75 | - "compare" | |
| 76 | - ], | |
| 77 | - "license": "MIT", | |
| 78 | - "main": "dist/index.js", | |
| 79 | - "name": "@sindresorhus/is", | |
| 80 | - "publishConfig": { | |
| 81 | - "access": "public" | |
| 82 | - }, | |
| 83 | - "repository": { | |
| 84 | - "type": "git", | |
| 85 | - "url": "git+https://github.com/sindresorhus/is.git" | |
| 86 | - }, | |
| 87 | - "scripts": { | |
| 88 | - "build": "tsc", | |
| 89 | - "lint": "tslint --format stylish --project .", | |
| 90 | - "prepublish": "npm run build && del dist/tests", | |
| 91 | - "test": "npm run lint && npm run build && ava dist/tests" | |
| 92 | - }, | |
| 93 | - "types": "dist/index.d.ts", | |
| 94 | - "version": "0.7.0" | |
| 95 | -} |
node_modules/@sindresorhus/is/readme.md
| ... | ... | @@ -1,323 +0,0 @@ |
| 1 | -# is [](https://travis-ci.org/sindresorhus/is) | |
| 2 | - | |
| 3 | -> Type check values: `is.string('๐ฆ') //=> true` | |
| 4 | - | |
| 5 | -<img src="header.gif" width="182" align="right"> | |
| 6 | - | |
| 7 | - | |
| 8 | -## Install | |
| 9 | - | |
| 10 | -``` | |
| 11 | -$ npm install @sindresorhus/is | |
| 12 | -``` | |
| 13 | - | |
| 14 | - | |
| 15 | -## Usage | |
| 16 | - | |
| 17 | -```js | |
| 18 | -const is = require('@sindresorhus/is'); | |
| 19 | - | |
| 20 | -is('๐ฆ'); | |
| 21 | -//=> 'string' | |
| 22 | - | |
| 23 | -is(new Map()); | |
| 24 | -//=> 'Map' | |
| 25 | - | |
| 26 | -is.number(6); | |
| 27 | -//=> true | |
| 28 | -``` | |
| 29 | - | |
| 30 | - | |
| 31 | -## API | |
| 32 | - | |
| 33 | -### is(value) | |
| 34 | - | |
| 35 | -Returns the type of `value`. | |
| 36 | - | |
| 37 | -Primitives are lowercase and object types are camelcase. | |
| 38 | - | |
| 39 | -Example: | |
| 40 | - | |
| 41 | -- `'undefined'` | |
| 42 | -- `'null'` | |
| 43 | -- `'string'` | |
| 44 | -- `'symbol'` | |
| 45 | -- `'Array'` | |
| 46 | -- `'Function'` | |
| 47 | -- `'Object'` | |
| 48 | - | |
| 49 | -Note: It will throw if you try to feed it object-wrapped primitives, as that's a bad practice. For example `new String('foo')`. | |
| 50 | - | |
| 51 | -### is.{method} | |
| 52 | - | |
| 53 | -All the below methods accept a value and returns a boolean for whether the value is of the desired type. | |
| 54 | - | |
| 55 | -#### Primitives | |
| 56 | - | |
| 57 | -##### .undefined(value) | |
| 58 | -##### .null(value) | |
| 59 | -##### .string(value) | |
| 60 | -##### .number(value) | |
| 61 | -##### .boolean(value) | |
| 62 | -##### .symbol(value) | |
| 63 | - | |
| 64 | -#### Built-in types | |
| 65 | - | |
| 66 | -##### .array(value) | |
| 67 | -##### .function(value) | |
| 68 | -##### .buffer(value) | |
| 69 | -##### .object(value) | |
| 70 | - | |
| 71 | -Keep in mind that [functions are objects too](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions). | |
| 72 | - | |
| 73 | -##### .regExp(value) | |
| 74 | -##### .date(value) | |
| 75 | -##### .error(value) | |
| 76 | -##### .nativePromise(value) | |
| 77 | -##### .promise(value) | |
| 78 | - | |
| 79 | -Returns `true` for any object with a `.then()` and `.catch()` method. Prefer this one over `.nativePromise()` as you usually want to allow userland promise implementations too. | |
| 80 | - | |
| 81 | -##### .generator(value) | |
| 82 | - | |
| 83 | -Returns `true` for any object that implements its own `.next()` and `.throw()` methods and has a function definition for `Symbol.iterator`. | |
| 84 | - | |
| 85 | -##### .generatorFunction(value) | |
| 86 | - | |
| 87 | -##### .asyncFunction(value) | |
| 88 | - | |
| 89 | -Returns `true` for any `async` function that can be called with the `await` operator. | |
| 90 | - | |
| 91 | -```js | |
| 92 | -is.asyncFunction(async () => {}); | |
| 93 | -// => true | |
| 94 | - | |
| 95 | -is.asyncFunction(() => {}); | |
| 96 | -// => false | |
| 97 | -``` | |
| 98 | - | |
| 99 | -##### .boundFunction(value) | |
| 100 | - | |
| 101 | -Returns `true` for any `bound` function. | |
| 102 | - | |
| 103 | -```js | |
| 104 | -is.boundFunction(() => {}); | |
| 105 | -// => true | |
| 106 | - | |
| 107 | -is.boundFunction(function () {}.bind(null)); | |
| 108 | -// => true | |
| 109 | - | |
| 110 | -is.boundFunction(function () {}); | |
| 111 | -// => false | |
| 112 | -``` | |
| 113 | - | |
| 114 | -##### .map(value) | |
| 115 | -##### .set(value) | |
| 116 | -##### .weakMap(value) | |
| 117 | -##### .weakSet(value) | |
| 118 | - | |
| 119 | -#### Typed arrays | |
| 120 | - | |
| 121 | -##### .int8Array(value) | |
| 122 | -##### .uint8Array(value) | |
| 123 | -##### .uint8ClampedArray(value) | |
| 124 | -##### .int16Array(value) | |
| 125 | -##### .uint16Array(value) | |
| 126 | -##### .int32Array(value) | |
| 127 | -##### .uint32Array(value) | |
| 128 | -##### .float32Array(value) | |
| 129 | -##### .float64Array(value) | |
| 130 | - | |
| 131 | -#### Structured data | |
| 132 | - | |
| 133 | -##### .arrayBuffer(value) | |
| 134 | -##### .sharedArrayBuffer(value) | |
| 135 | -##### .dataView(value) | |
| 136 | - | |
| 137 | -#### Miscellaneous | |
| 138 | - | |
| 139 | -##### .directInstanceOf(value, class) | |
| 140 | - | |
| 141 | -Returns `true` if `value` is a direct instance of `class`. | |
| 142 | - | |
| 143 | -```js | |
| 144 | -is.directInstanceOf(new Error(), Error); | |
| 145 | -//=> true | |
| 146 | - | |
| 147 | -class UnicornError extends Error {}; | |
| 148 | - | |
| 149 | -is.directInstanceOf(new UnicornError(), Error); | |
| 150 | -//=> false | |
| 151 | -``` | |
| 152 | - | |
| 153 | -##### .truthy(value) | |
| 154 | - | |
| 155 | -Returns `true` for all values that evaluate to true in a boolean context: | |
| 156 | - | |
| 157 | -```js | |
| 158 | -is.truthy('๐ฆ'); | |
| 159 | -//=> true | |
| 160 | - | |
| 161 | -is.truthy(undefined); | |
| 162 | -//=> false | |
| 163 | -``` | |
| 164 | - | |
| 165 | -##### .falsy(value) | |
| 166 | - | |
| 167 | -Returns `true` if `value` is one of: `false`, `0`, `''`, `null`, `undefined`, `NaN`. | |
| 168 | - | |
| 169 | -##### .nan(value) | |
| 170 | -##### .nullOrUndefined(value) | |
| 171 | -##### .primitive(value) | |
| 172 | - | |
| 173 | -JavaScript primitives are as follows: `null`, `undefined`, `string`, `number`, `boolean`, `symbol`. | |
| 174 | - | |
| 175 | -##### .integer(value) | |
| 176 | - | |
| 177 | -##### .safeInteger(value) | |
| 178 | - | |
| 179 | -Returns `true` if `value` is a [safe integer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger). | |
| 180 | - | |
| 181 | -##### .plainObject(value) | |
| 182 | - | |
| 183 | -An object is plain if it's created by either `{}`, `new Object()`, or `Object.create(null)`. | |
| 184 | - | |
| 185 | -##### .iterable(value) | |
| 186 | -##### .class(value) | |
| 187 | - | |
| 188 | -Returns `true` for instances created by a ES2015 class. | |
| 189 | - | |
| 190 | -##### .typedArray(value) | |
| 191 | - | |
| 192 | -##### .arrayLike(value) | |
| 193 | - | |
| 194 | -A `value` is array-like if it is not a function and has a `value.length` that is a safe integer greater than or equal to 0. | |
| 195 | - | |
| 196 | -```js | |
| 197 | -is.arrayLike(document.forms); | |
| 198 | -//=> true | |
| 199 | - | |
| 200 | -function () { | |
| 201 | - is.arrayLike(arguments); | |
| 202 | - //=> true | |
| 203 | -} | |
| 204 | -``` | |
| 205 | - | |
| 206 | -##### .inRange(value, range) | |
| 207 | - | |
| 208 | -Check if `value` (number) is in the given `range`. The range is an array of two values, lower bound and upper bound, in no specific order. | |
| 209 | - | |
| 210 | -```js | |
| 211 | -is.inRange(3, [0, 5]); | |
| 212 | -is.inRange(3, [5, 0]); | |
| 213 | -is.inRange(0, [-2, 2]); | |
| 214 | -``` | |
| 215 | - | |
| 216 | -##### .inRange(value, upperBound) | |
| 217 | - | |
| 218 | -Check if `value` (number) is in the range of `0` to `upperBound`. | |
| 219 | - | |
| 220 | -```js | |
| 221 | -is.inRange(3, 10); | |
| 222 | -``` | |
| 223 | - | |
| 224 | -##### .domElement(value) | |
| 225 | - | |
| 226 | -Returns `true` if `value` is a DOM Element. | |
| 227 | - | |
| 228 | -##### .nodeStream(value) | |
| 229 | - | |
| 230 | -Returns `true` if `value` is a Node.js [stream](https://nodejs.org/api/stream.html). | |
| 231 | - | |
| 232 | -```js | |
| 233 | -const fs = require('fs'); | |
| 234 | -is.nodeStream(fs.createReadStream('unicorn.png')); | |
| 235 | -//=> true | |
| 236 | -``` | |
| 237 | - | |
| 238 | -##### .infinite(value) | |
| 239 | - | |
| 240 | -Check if `value` is `Infinity` or `-Infinity`. | |
| 241 | - | |
| 242 | -##### .even(value) | |
| 243 | - | |
| 244 | -Returns `true` if `value` is an even integer. | |
| 245 | - | |
| 246 | -##### .odd(value) | |
| 247 | - | |
| 248 | -Returns `true` if `value` is an odd integer. | |
| 249 | - | |
| 250 | -##### .empty(value) | |
| 251 | - | |
| 252 | -Returns `true` if `value` is falsy or an empty string, array, object, map, or set. | |
| 253 | - | |
| 254 | -##### .emptyOrWhitespace(value) | |
| 255 | - | |
| 256 | -Returns `true` if `is.empty(value)` or a string that is all whitespace. | |
| 257 | - | |
| 258 | - | |
| 259 | -##### .any(predicate, ...values) | |
| 260 | - | |
| 261 | -Returns `true` if **any** of the input `values` returns true in the `predicate`: | |
| 262 | - | |
| 263 | -```js | |
| 264 | -is.any(is.string, {}, true, '๐ฆ'); | |
| 265 | -//=> true | |
| 266 | - | |
| 267 | -is.any(is.boolean, 'unicorns', [], new Map()); | |
| 268 | -//=> false | |
| 269 | -``` | |
| 270 | - | |
| 271 | -##### .all(predicate, ...values) | |
| 272 | - | |
| 273 | -Returns `true` if **all** of the input `values` returns true in the `predicate`: | |
| 274 | - | |
| 275 | -```js | |
| 276 | -is.all(is.object, {}, new Map(), new Set()); | |
| 277 | -//=> true | |
| 278 | - | |
| 279 | -is.all(is.string, '๐ฆ', [], 'unicorns'); | |
| 280 | -//=> false | |
| 281 | -``` | |
| 282 | - | |
| 283 | -## FAQ | |
| 284 | - | |
| 285 | -### Why yet another type checking module? | |
| 286 | - | |
| 287 | -There are hundreds of type checking modules on npm, unfortunately, I couldn't find any that fit my needs: | |
| 288 | - | |
| 289 | -- Includes both type methods and ability to get the type | |
| 290 | -- Types of primitives returned as lowercase and object types as camelcase | |
| 291 | -- Covers all built-ins | |
| 292 | -- Unsurprising behavior | |
| 293 | -- Well-maintained | |
| 294 | -- Comprehensive test suite | |
| 295 | - | |
| 296 | -For the ones I found, pick 3 of these. | |
| 297 | - | |
| 298 | -The most common mistakes I noticed in these modules was using `instanceof` for type checking, forgetting that functions are objects, and omitting `symbol` as a primitive. | |
| 299 | - | |
| 300 | - | |
| 301 | -## Related | |
| 302 | - | |
| 303 | -- [is-stream](https://github.com/sindresorhus/is-stream) - Check if something is a Node.js stream | |
| 304 | -- [is-observable](https://github.com/sindresorhus/is-observable) - Check if a value is an Observable | |
| 305 | -- [file-type](https://github.com/sindresorhus/file-type) - Detect the file type of a Buffer/Uint8Array | |
| 306 | -- [is-ip](https://github.com/sindresorhus/is-ip) - Check if a string is an IP address | |
| 307 | -- [is-array-sorted](https://github.com/sindresorhus/is-array-sorted) - Check if an Array is sorted | |
| 308 | -- [is-error-constructor](https://github.com/sindresorhus/is-error-constructor) - Check if a value is an error constructor | |
| 309 | -- [is-empty-iterable](https://github.com/sindresorhus/is-empty-iterable) - Check if an Iterable is empty | |
| 310 | -- [is-blob](https://github.com/sindresorhus/is-blob) - Check if a value is a Blob - File-like object of immutable, raw data | |
| 311 | -- [has-emoji](https://github.com/sindresorhus/has-emoji) - Check whether a string has any emoji | |
| 312 | - | |
| 313 | - | |
| 314 | -## Created by | |
| 315 | - | |
| 316 | -- [Sindre Sorhus](https://github.com/sindresorhus) | |
| 317 | -- [Giora Guttsait](https://github.com/gioragutt) | |
| 318 | -- [Brandon Smith](https://github.com/brandon93s) | |
| 319 | - | |
| 320 | - | |
| 321 | -## License | |
| 322 | - | |
| 323 | -MIT |
node_modules/@slynova/slug/README.md
| ... | ... | @@ -1,42 +0,0 @@ |
| 1 | -# node-slug | |
| 2 | - | |
| 3 | -Transforms any text into an uri-safe string. | |
| 4 | - | |
| 5 | ---- | |
| 6 | - | |
| 7 | -## Getting Started | |
| 8 | - | |
| 9 | -This package is available in the Node Package Repository and can be easily installed with [npm](https://docs.npmjs.com/getting-started/what-is-npm) or [yarn](https://yarnpkg.com). | |
| 10 | - | |
| 11 | -```bash | |
| 12 | -$ npm i @slynova/slug | |
| 13 | -# or | |
| 14 | -$ yarn add @slynova/slug | |
| 15 | -``` | |
| 16 | - | |
| 17 | -Then require the `slug()` method directly from the package. | |
| 18 | - | |
| 19 | -```javascript | |
| 20 | -const slug = require('@slynova/slug') | |
| 21 | - | |
| 22 | -slug('1 < 2') // 1-less-2 | |
| 23 | -slug('Hey! How are you') // hey-how-are-you | |
| 24 | -slug('tรดi tรชn lร ฤแปฉc tแบก') // toi-ten-la-duc-ta | |
| 25 | -slug('learn adonis in 30minutes') // learn-adonis-in-30-minutes | |
| 26 | -``` | |
| 27 | - | |
| 28 | -## Extending char map | |
| 29 | - | |
| 30 | -To extend the char map you can use the static method `extends` | |
| 31 | - | |
| 32 | -```javascript | |
| 33 | -const slug = require('@slynova/slug') | |
| 34 | - | |
| 35 | -slug.extends({'๐': 'love'}) | |
| 36 | -slug('i ๐ you') // i-love-you | |
| 37 | -``` | |
| 38 | - | |
| 39 | -## Contribution Guidelines | |
| 40 | - | |
| 41 | -Any pull requests or discussions are welcome.<br> | |
| 42 | -Note that every pull request providing a new feature or correcting a bug should be created with appropriate unit tests. |
node_modules/@slynova/slug/package.json
| ... | ... | @@ -1,59 +0,0 @@ |
| 1 | -{ | |
| 2 | - "_from": "@slynova/slug@^1.0.0", | |
| 3 | - "_id": "@slynova/slug@1.1.2", | |
| 4 | - "_inBundle": false, | |
| 5 | - "_integrity": "sha512-lFJRP4rqRxqxMjEnIih84jvQC6Xc4a3Yi0Z3gbemWOJX60HBBqEFfFrudmYYA+ga46b6Gxv7ofguZ9+ghl1EMg==", | |
| 6 | - "_location": "/@slynova/slug", | |
| 7 | - "_phantomChildren": {}, | |
| 8 | - "_requested": { | |
| 9 | - "type": "range", | |
| 10 | - "registry": true, | |
| 11 | - "raw": "@slynova/slug@^1.0.0", | |
| 12 | - "name": "@slynova/slug", | |
| 13 | - "escapedName": "@slynova%2fslug", | |
| 14 | - "scope": "@slynova", | |
| 15 | - "rawSpec": "^1.0.0", | |
| 16 | - "saveSpec": null, | |
| 17 | - "fetchSpec": "^1.0.0" | |
| 18 | - }, | |
| 19 | - "_requiredBy": [ | |
| 20 | - "/indicative" | |
| 21 | - ], | |
| 22 | - "_resolved": "https://registry.npmjs.org/@slynova/slug/-/slug-1.1.2.tgz", | |
| 23 | - "_shasum": "c6289781da191b3ea386d678843cb7a7db7844e8", | |
| 24 | - "_spec": "@slynova/slug@^1.0.0", | |
| 25 | - "_where": "C:\\Users\\admin\\Documents\\express-project\\node_modules\\indicative", | |
| 26 | - "author": { | |
| 27 | - "name": "Romain Lanz", | |
| 28 | - "email": "romain.lanz@slynova.ch" | |
| 29 | - }, | |
| 30 | - "bugs": { | |
| 31 | - "url": "https://github.com/Slynova-Org/slug/issues" | |
| 32 | - }, | |
| 33 | - "bundleDependencies": false, | |
| 34 | - "dependencies": { | |
| 35 | - "charmap": "^1.1.6", | |
| 36 | - "lodash.kebabcase": "^4.1.1" | |
| 37 | - }, | |
| 38 | - "deprecated": false, | |
| 39 | - "description": "Transforms any text into an uri-safe string.", | |
| 40 | - "devDependencies": { | |
| 41 | - "japa": "^1.0.6", | |
| 42 | - "japa-cli": "^1.0.1", | |
| 43 | - "nyc": "^11.9.0" | |
| 44 | - }, | |
| 45 | - "homepage": "https://github.com/Slynova-Org/slug#readme", | |
| 46 | - "license": "MIT", | |
| 47 | - "main": "src/index.js", | |
| 48 | - "name": "@slynova/slug", | |
| 49 | - "repository": { | |
| 50 | - "type": "git", | |
| 51 | - "url": "git+https://github.com/Slynova-Org/slug.git" | |
| 52 | - }, | |
| 53 | - "scripts": { | |
| 54 | - "test": "npm run test:coverage", | |
| 55 | - "test:coverage": "nyc npm run test:local", | |
| 56 | - "test:local": "japa" | |
| 57 | - }, | |
| 58 | - "version": "1.1.2" | |
| 59 | -} |
node_modules/@slynova/slug/src/index.js
| ... | ... | @@ -1,59 +0,0 @@ |
| 1 | -'use strict' | |
| 2 | - | |
| 3 | -/** | |
| 4 | - * node-slug | |
| 5 | - * | |
| 6 | - * @license MIT | |
| 7 | - * @copyright Slynova - Romain Lanz <romain.lanz@slynova.ch> | |
| 8 | - */ | |
| 9 | - | |
| 10 | -var kebabCase = require('lodash.kebabcase') | |
| 11 | -var transform = require('charmap').transform | |
| 12 | - | |
| 13 | -/** | |
| 14 | - * Slugify any given characters. | |
| 15 | - * | |
| 16 | - * @method slug | |
| 17 | - * | |
| 18 | - * @param {string|number} text Text to Slugify | |
| 19 | - * | |
| 20 | - * @return {string} | |
| 21 | - */ | |
| 22 | -function slug (text) { | |
| 23 | - if (text === void 0) return '' | |
| 24 | - | |
| 25 | - return kebabCase( | |
| 26 | - removeNonAsciiChar( | |
| 27 | - transform( | |
| 28 | - text.toString() | |
| 29 | - ) | |
| 30 | - ) | |
| 31 | - ) | |
| 32 | -} | |
| 33 | - | |
| 34 | -/** | |
| 35 | - * Remove non-ascii character. | |
| 36 | - * | |
| 37 | - * @method removeNonAsciiChar | |
| 38 | - * | |
| 39 | - * @param {string} text Text to remove non-ascii character | |
| 40 | - * | |
| 41 | - * @return {string} | |
| 42 | - */ | |
| 43 | -function removeNonAsciiChar (text) { | |
| 44 | - var newText = '' | |
| 45 | - | |
| 46 | - for (var i = 0; i <= text.length; i++) { | |
| 47 | - if (text.charCodeAt(i) < 128) { | |
| 48 | - newText += text[i] | |
| 49 | - } | |
| 50 | - } | |
| 51 | - | |
| 52 | - return newText | |
| 53 | -} | |
| 54 | - | |
| 55 | -slug.extends = function (customMap) { | |
| 56 | - transform.extends(customMap) | |
| 57 | -} | |
| 58 | - | |
| 59 | -module.exports = slug | |
| 60 | 0 | \ No newline at end of file |
node_modules/accepts/HISTORY.md
| ... | ... | @@ -1,224 +0,0 @@ |
| 1 | -1.3.5 / 2018-02-28 | |
| 2 | -================== | |
| 3 | - | |
| 4 | - * deps: mime-types@~2.1.18 | |
| 5 | - - deps: mime-db@~1.33.0 | |
| 6 | - | |
| 7 | -1.3.4 / 2017-08-22 | |
| 8 | -================== | |
| 9 | - | |
| 10 | - * deps: mime-types@~2.1.16 | |
| 11 | - - deps: mime-db@~1.29.0 | |
| 12 | - | |
| 13 | -1.3.3 / 2016-05-02 | |
| 14 | -================== | |
| 15 | - | |
| 16 | - * deps: mime-types@~2.1.11 | |
| 17 | - - deps: mime-db@~1.23.0 | |
| 18 | - * deps: negotiator@0.6.1 | |
| 19 | - - perf: improve `Accept` parsing speed | |
| 20 | - - perf: improve `Accept-Charset` parsing speed | |
| 21 | - - perf: improve `Accept-Encoding` parsing speed | |
| 22 | - - perf: improve `Accept-Language` parsing speed | |
| 23 | - | |
| 24 | -1.3.2 / 2016-03-08 | |
| 25 | -================== | |
| 26 | - | |
| 27 | - * deps: mime-types@~2.1.10 | |
| 28 | - - Fix extension of `application/dash+xml` | |
| 29 | - - Update primary extension for `audio/mp4` | |
| 30 | - - deps: mime-db@~1.22.0 | |
| 31 | - | |
| 32 | -1.3.1 / 2016-01-19 | |
| 33 | -================== | |
| 34 | - | |
| 35 | - * deps: mime-types@~2.1.9 | |
| 36 | - - deps: mime-db@~1.21.0 | |
| 37 | - | |
| 38 | -1.3.0 / 2015-09-29 | |
| 39 | -================== | |
| 40 | - | |
| 41 | - * deps: mime-types@~2.1.7 | |
| 42 | - - deps: mime-db@~1.19.0 | |
| 43 | - * deps: negotiator@0.6.0 | |
| 44 | - - Fix including type extensions in parameters in `Accept` parsing | |
| 45 | - - Fix parsing `Accept` parameters with quoted equals | |
| 46 | - - Fix parsing `Accept` parameters with quoted semicolons | |
| 47 | - - Lazy-load modules from main entry point | |
| 48 | - - perf: delay type concatenation until needed | |
| 49 | - - perf: enable strict mode | |
| 50 | - - perf: hoist regular expressions | |
| 51 | - - perf: remove closures getting spec properties | |
| 52 | - - perf: remove a closure from media type parsing | |
| 53 | - - perf: remove property delete from media type parsing | |
| 54 | - | |
| 55 | -1.2.13 / 2015-09-06 | |
| 56 | -=================== | |
| 57 | - | |
| 58 | - * deps: mime-types@~2.1.6 | |
| 59 | - - deps: mime-db@~1.18.0 | |
| 60 | - | |
| 61 | -1.2.12 / 2015-07-30 | |
| 62 | -=================== | |
| 63 | - | |
| 64 | - * deps: mime-types@~2.1.4 | |
| 65 | - - deps: mime-db@~1.16.0 | |
| 66 | - | |
| 67 | -1.2.11 / 2015-07-16 | |
| 68 | -=================== | |
| 69 | - | |
| 70 | - * deps: mime-types@~2.1.3 | |
| 71 | - - deps: mime-db@~1.15.0 | |
| 72 | - | |
| 73 | -1.2.10 / 2015-07-01 | |
| 74 | -=================== | |
| 75 | - | |
| 76 | - * deps: mime-types@~2.1.2 | |
| 77 | - - deps: mime-db@~1.14.0 | |
| 78 | - | |
| 79 | -1.2.9 / 2015-06-08 | |
| 80 | -================== | |
| 81 | - | |
| 82 | - * deps: mime-types@~2.1.1 | |
| 83 | - - perf: fix deopt during mapping | |
| 84 | - | |
| 85 | -1.2.8 / 2015-06-07 | |
| 86 | -================== | |
| 87 | - | |
| 88 | - * deps: mime-types@~2.1.0 | |
| 89 | - - deps: mime-db@~1.13.0 | |
| 90 | - * perf: avoid argument reassignment & argument slice | |
| 91 | - * perf: avoid negotiator recursive construction | |
| 92 | - * perf: enable strict mode | |
| 93 | - * perf: remove unnecessary bitwise operator | |
| 94 | - | |
| 95 | -1.2.7 / 2015-05-10 | |
| 96 | -================== | |
| 97 | - | |
| 98 | - * deps: negotiator@0.5.3 | |
| 99 | - - Fix media type parameter matching to be case-insensitive | |
| 100 | - | |
| 101 | -1.2.6 / 2015-05-07 | |
| 102 | -================== | |
| 103 | - | |
| 104 | - * deps: mime-types@~2.0.11 | |
| 105 | - - deps: mime-db@~1.9.1 | |
| 106 | - * deps: negotiator@0.5.2 | |
| 107 | - - Fix comparing media types with quoted values | |
| 108 | - - Fix splitting media types with quoted commas | |
| 109 | - | |
| 110 | -1.2.5 / 2015-03-13 | |
| 111 | -================== | |
| 112 | - | |
| 113 | - * deps: mime-types@~2.0.10 | |
| 114 | - - deps: mime-db@~1.8.0 | |
| 115 | - | |
| 116 | -1.2.4 / 2015-02-14 | |
| 117 | -================== | |
| 118 | - | |
| 119 | - * Support Node.js 0.6 | |
| 120 | - * deps: mime-types@~2.0.9 | |
| 121 | - - deps: mime-db@~1.7.0 | |
| 122 | - * deps: negotiator@0.5.1 | |
| 123 | - - Fix preference sorting to be stable for long acceptable lists | |
| 124 | - | |
| 125 | -1.2.3 / 2015-01-31 | |
| 126 | -================== | |
| 127 | - | |
| 128 | - * deps: mime-types@~2.0.8 | |
| 129 | - - deps: mime-db@~1.6.0 | |
| 130 | - | |
| 131 | -1.2.2 / 2014-12-30 | |
| 132 | -================== | |
| 133 | - | |
| 134 | - * deps: mime-types@~2.0.7 | |
| 135 | - - deps: mime-db@~1.5.0 | |
| 136 | - | |
| 137 | -1.2.1 / 2014-12-30 | |
| 138 | -================== | |
| 139 | - | |
| 140 | - * deps: mime-types@~2.0.5 | |
| 141 | - - deps: mime-db@~1.3.1 | |
| 142 | - | |
| 143 | -1.2.0 / 2014-12-19 | |
| 144 | -================== | |
| 145 | - | |
| 146 | - * deps: negotiator@0.5.0 | |
| 147 | - - Fix list return order when large accepted list | |
| 148 | - - Fix missing identity encoding when q=0 exists | |
| 149 | - - Remove dynamic building of Negotiator class | |
| 150 | - | |
| 151 | -1.1.4 / 2014-12-10 | |
| 152 | -================== | |
| 153 | - | |
| 154 | - * deps: mime-types@~2.0.4 | |
| 155 | - - deps: mime-db@~1.3.0 | |
| 156 | - | |
| 157 | -1.1.3 / 2014-11-09 | |
| 158 | -================== | |
| 159 | - | |
| 160 | - * deps: mime-types@~2.0.3 | |
| 161 | - - deps: mime-db@~1.2.0 | |
| 162 | - | |
| 163 | -1.1.2 / 2014-10-14 | |
| 164 | -================== | |
| 165 | - | |
| 166 | - * deps: negotiator@0.4.9 | |
| 167 | - - Fix error when media type has invalid parameter | |
| 168 | - | |
| 169 | -1.1.1 / 2014-09-28 | |
| 170 | -================== | |
| 171 | - | |
| 172 | - * deps: mime-types@~2.0.2 | |
| 173 | - - deps: mime-db@~1.1.0 | |
| 174 | - * deps: negotiator@0.4.8 | |
| 175 | - - Fix all negotiations to be case-insensitive | |
| 176 | - - Stable sort preferences of same quality according to client order | |
| 177 | - | |
| 178 | -1.1.0 / 2014-09-02 | |
| 179 | -================== | |
| 180 | - | |
| 181 | - * update `mime-types` | |
| 182 | - | |
| 183 | -1.0.7 / 2014-07-04 | |
| 184 | -================== | |
| 185 | - | |
| 186 | - * Fix wrong type returned from `type` when match after unknown extension | |
| 187 | - | |
| 188 | -1.0.6 / 2014-06-24 | |
| 189 | -================== | |
| 190 | - | |
| 191 | - * deps: negotiator@0.4.7 | |
| 192 | - | |
| 193 | -1.0.5 / 2014-06-20 | |
| 194 | -================== | |
| 195 | - | |
| 196 | - * fix crash when unknown extension given | |
| 197 | - | |
| 198 | -1.0.4 / 2014-06-19 | |
| 199 | -================== | |
| 200 | - | |
| 201 | - * use `mime-types` | |
| 202 | - | |
| 203 | -1.0.3 / 2014-06-11 | |
| 204 | -================== | |
| 205 | - | |
| 206 | - * deps: negotiator@0.4.6 | |
| 207 | - - Order by specificity when quality is the same | |
| 208 | - | |
| 209 | -1.0.2 / 2014-05-29 | |
| 210 | -================== | |
| 211 | - | |
| 212 | - * Fix interpretation when header not in request | |
| 213 | - * deps: pin negotiator@0.4.5 | |
| 214 | - | |
| 215 | -1.0.1 / 2014-01-18 | |
| 216 | -================== | |
| 217 | - | |
| 218 | - * Identity encoding isn't always acceptable | |
| 219 | - * deps: negotiator@~0.4.0 | |
| 220 | - | |
| 221 | -1.0.0 / 2013-12-27 | |
| 222 | -================== | |
| 223 | - | |
| 224 | - * Genesis |
node_modules/accepts/LICENSE
| ... | ... | @@ -1,23 +0,0 @@ |
| 1 | -(The MIT License) | |
| 2 | - | |
| 3 | -Copyright (c) 2014 Jonathan Ong <me@jongleberry.com> | |
| 4 | -Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com> | |
| 5 | - | |
| 6 | -Permission is hereby granted, free of charge, to any person obtaining | |
| 7 | -a copy of this software and associated documentation files (the | |
| 8 | -'Software'), to deal in the Software without restriction, including | |
| 9 | -without limitation the rights to use, copy, modify, merge, publish, | |
| 10 | -distribute, sublicense, and/or sell copies of the Software, and to | |
| 11 | -permit persons to whom the Software is furnished to do so, subject to | |
| 12 | -the following conditions: | |
| 13 | - | |
| 14 | -The above copyright notice and this permission notice shall be | |
| 15 | -included in all copies or substantial portions of the Software. | |
| 16 | - | |
| 17 | -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, | |
| 18 | -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
| 19 | -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | |
| 20 | -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | |
| 21 | -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | |
| 22 | -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | |
| 23 | -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
node_modules/accepts/README.md
| ... | ... | @@ -1,143 +0,0 @@ |
| 1 | -# accepts | |
| 2 | - | |
| 3 | -[![NPM Version][npm-image]][npm-url] | |
| 4 | -[![NPM Downloads][downloads-image]][downloads-url] | |
| 5 | -[![Node.js Version][node-version-image]][node-version-url] | |
| 6 | -[![Build Status][travis-image]][travis-url] | |
| 7 | -[![Test Coverage][coveralls-image]][coveralls-url] | |
| 8 | - | |
| 9 | -Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator). | |
| 10 | -Extracted from [koa](https://www.npmjs.com/package/koa) for general use. | |
| 11 | - | |
| 12 | -In addition to negotiator, it allows: | |
| 13 | - | |
| 14 | -- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])` | |
| 15 | - as well as `('text/html', 'application/json')`. | |
| 16 | -- Allows type shorthands such as `json`. | |
| 17 | -- Returns `false` when no types match | |
| 18 | -- Treats non-existent headers as `*` | |
| 19 | - | |
| 20 | -## Installation | |
| 21 | - | |
| 22 | -This is a [Node.js](https://nodejs.org/en/) module available through the | |
| 23 | -[npm registry](https://www.npmjs.com/). Installation is done using the | |
| 24 | -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): | |
| 25 | - | |
| 26 | -```sh | |
| 27 | -$ npm install accepts | |
| 28 | -``` | |
| 29 | - | |
| 30 | -## API | |
| 31 | - | |
| 32 | -<!-- eslint-disable no-unused-vars --> | |
| 33 | - | |
| 34 | -```js | |
| 35 | -var accepts = require('accepts') | |
| 36 | -``` | |
| 37 | - | |
| 38 | -### accepts(req) | |
| 39 | - | |
| 40 | -Create a new `Accepts` object for the given `req`. | |
| 41 | - | |
| 42 | -#### .charset(charsets) | |
| 43 | - | |
| 44 | -Return the first accepted charset. If nothing in `charsets` is accepted, | |
| 45 | -then `false` is returned. | |
| 46 | - | |
| 47 | -#### .charsets() | |
| 48 | - | |
| 49 | -Return the charsets that the request accepts, in the order of the client's | |
| 50 | -preference (most preferred first). | |
| 51 | - | |
| 52 | -#### .encoding(encodings) | |
| 53 | - | |
| 54 | -Return the first accepted encoding. If nothing in `encodings` is accepted, | |
| 55 | -then `false` is returned. | |
| 56 | - | |
| 57 | -#### .encodings() | |
| 58 | - | |
| 59 | -Return the encodings that the request accepts, in the order of the client's | |
| 60 | -preference (most preferred first). | |
| 61 | - | |
| 62 | -#### .language(languages) | |
| 63 | - | |
| 64 | -Return the first accepted language. If nothing in `languages` is accepted, | |
| 65 | -then `false` is returned. | |
| 66 | - | |
| 67 | -#### .languages() | |
| 68 | - | |
| 69 | -Return the languages that the request accepts, in the order of the client's | |
| 70 | -preference (most preferred first). | |
| 71 | - | |
| 72 | -#### .type(types) | |
| 73 | - | |
| 74 | -Return the first accepted type (and it is returned as the same text as what | |
| 75 | -appears in the `types` array). If nothing in `types` is accepted, then `false` | |
| 76 | -is returned. | |
| 77 | - | |
| 78 | -The `types` array can contain full MIME types or file extensions. Any value | |
| 79 | -that is not a full MIME types is passed to `require('mime-types').lookup`. | |
| 80 | - | |
| 81 | -#### .types() | |
| 82 | - | |
| 83 | -Return the types that the request accepts, in the order of the client's | |
| 84 | -preference (most preferred first). | |
| 85 | - | |
| 86 | -## Examples | |
| 87 | - | |
| 88 | -### Simple type negotiation | |
| 89 | - | |
| 90 | -This simple example shows how to use `accepts` to return a different typed | |
| 91 | -respond body based on what the client wants to accept. The server lists it's | |
| 92 | -preferences in order and will get back the best match between the client and | |
| 93 | -server. | |
| 94 | - | |
| 95 | -```js | |
| 96 | -var accepts = require('accepts') | |
| 97 | -var http = require('http') | |
| 98 | - | |
| 99 | -function app (req, res) { | |
| 100 | - var accept = accepts(req) | |
| 101 | - | |
| 102 | - // the order of this list is significant; should be server preferred order | |
| 103 | - switch (accept.type(['json', 'html'])) { | |
| 104 | - case 'json': | |
| 105 | - res.setHeader('Content-Type', 'application/json') | |
| 106 | - res.write('{"hello":"world!"}') | |
| 107 | - break | |
| 108 | - case 'html': | |
| 109 | - res.setHeader('Content-Type', 'text/html') | |
| 110 | - res.write('<b>hello, world!</b>') | |
| 111 | - break | |
| 112 | - default: | |
| 113 | - // the fallback is text/plain, so no need to specify it above | |
| 114 | - res.setHeader('Content-Type', 'text/plain') | |
| 115 | - res.write('hello, world!') | |
| 116 | - break | |
| 117 | - } | |
| 118 | - | |
| 119 | - res.end() | |
| 120 | -} | |
| 121 | - | |
| 122 | -http.createServer(app).listen(3000) | |
| 123 | -``` | |
| 124 | - | |
| 125 | -You can test this out with the cURL program: | |
| 126 | -```sh | |
| 127 | -curl -I -H'Accept: text/html' http://localhost:3000/ | |
| 128 | -``` | |
| 129 | - | |
| 130 | -## License | |
| 131 | - | |
| 132 | -[MIT](LICENSE) | |
| 133 | - | |
| 134 | -[npm-image]: https://img.shields.io/npm/v/accepts.svg | |
| 135 | -[npm-url]: https://npmjs.org/package/accepts | |
| 136 | -[node-version-image]: https://img.shields.io/node/v/accepts.svg | |
| 137 | -[node-version-url]: https://nodejs.org/en/download/ | |
| 138 | -[travis-image]: https://img.shields.io/travis/jshttp/accepts/master.svg | |
| 139 | -[travis-url]: https://travis-ci.org/jshttp/accepts | |
| 140 | -[coveralls-image]: https://img.shields.io/coveralls/jshttp/accepts/master.svg | |
| 141 | -[coveralls-url]: https://coveralls.io/r/jshttp/accepts | |
| 142 | -[downloads-image]: https://img.shields.io/npm/dm/accepts.svg | |
| 143 | -[downloads-url]: https://npmjs.org/package/accepts |
node_modules/accepts/index.js
| ... | ... | @@ -1,238 +0,0 @@ |
| 1 | -/*! | |
| 2 | - * accepts | |
| 3 | - * Copyright(c) 2014 Jonathan Ong | |
| 4 | - * Copyright(c) 2015 Douglas Christopher Wilson | |
| 5 | - * MIT Licensed | |
| 6 | - */ | |
| 7 | - | |
| 8 | -'use strict' | |
| 9 | - | |
| 10 | -/** | |
| 11 | - * Module dependencies. | |
| 12 | - * @private | |
| 13 | - */ | |
| 14 | - | |
| 15 | -var Negotiator = require('negotiator') | |
| 16 | -var mime = require('mime-types') | |
| 17 | - | |
| 18 | -/** | |
| 19 | - * Module exports. | |
| 20 | - * @public | |
| 21 | - */ | |
| 22 | - | |
| 23 | -module.exports = Accepts | |
| 24 | - | |
| 25 | -/** | |
| 26 | - * Create a new Accepts object for the given req. | |
| 27 | - * | |
| 28 | - * @param {object} req | |
| 29 | - * @public | |
| 30 | - */ | |
| 31 | - | |
| 32 | -function Accepts (req) { | |
| 33 | - if (!(this instanceof Accepts)) { | |
| 34 | - return new Accepts(req) | |
| 35 | - } | |
| 36 | - | |
| 37 | - this.headers = req.headers | |
| 38 | - this.negotiator = new Negotiator(req) | |
| 39 | -} | |
| 40 | - | |
| 41 | -/** | |
| 42 | - * Check if the given `type(s)` is acceptable, returning | |
| 43 | - * the best match when true, otherwise `undefined`, in which | |
| 44 | - * case you should respond with 406 "Not Acceptable". | |
| 45 | - * | |
| 46 | - * The `type` value may be a single mime type string | |
| 47 | - * such as "application/json", the extension name | |
| 48 | - * such as "json" or an array `["json", "html", "text/plain"]`. When a list | |
| 49 | - * or array is given the _best_ match, if any is returned. | |
| 50 | - * | |
| 51 | - * Examples: | |
| 52 | - * | |
| 53 | - * // Accept: text/html | |
| 54 | - * this.types('html'); | |
| 55 | - * // => "html" | |
| 56 | - * | |
| 57 | - * // Accept: text/*, application/json | |
| 58 | - * this.types('html'); | |
| 59 | - * // => "html" | |
| 60 | - * this.types('text/html'); | |
| 61 | - * // => "text/html" | |
| 62 | - * this.types('json', 'text'); | |
| 63 | - * // => "json" | |
| 64 | - * this.types('application/json'); | |
| 65 | - * // => "application/json" | |
| 66 | - * | |
| 67 | - * // Accept: text/*, application/json | |
| 68 | - * this.types('image/png'); | |
| 69 | - * this.types('png'); | |
| 70 | - * // => undefined | |
| 71 | - * | |
| 72 | - * // Accept: text/*;q=.5, application/json | |
| 73 | - * this.types(['html', 'json']); | |
| 74 | - * this.types('html', 'json'); | |
| 75 | - * // => "json" | |
| 76 | - * | |
| 77 | - * @param {String|Array} types... | |
| 78 | - * @return {String|Array|Boolean} | |
| 79 | - * @public | |
| 80 | - */ | |
| 81 | - | |
| 82 | -Accepts.prototype.type = | |
| 83 | -Accepts.prototype.types = function (types_) { | |
| 84 | - var types = types_ | |
| 85 | - | |
| 86 | - // support flattened arguments | |
| 87 | - if (types && !Array.isArray(types)) { | |
| 88 | - types = new Array(arguments.length) | |
| 89 | - for (var i = 0; i < types.length; i++) { | |
| 90 | - types[i] = arguments[i] | |
| 91 | - } | |
| 92 | - } | |
| 93 | - | |
| 94 | - // no types, return all requested types | |
| 95 | - if (!types || types.length === 0) { | |
| 96 | - return this.negotiator.mediaTypes() | |
| 97 | - } | |
| 98 | - | |
| 99 | - // no accept header, return first given type | |
| 100 | - if (!this.headers.accept) { | |
| 101 | - return types[0] | |
| 102 | - } | |
| 103 | - | |
| 104 | - var mimes = types.map(extToMime) | |
| 105 | - var accepts = this.negotiator.mediaTypes(mimes.filter(validMime)) | |
| 106 | - var first = accepts[0] | |
| 107 | - | |
| 108 | - return first | |
| 109 | - ? types[mimes.indexOf(first)] | |
| 110 | - : false | |
| 111 | -} | |
| 112 | - | |
| 113 | -/** | |
| 114 | - * Return accepted encodings or best fit based on `encodings`. | |
| 115 | - * | |
| 116 | - * Given `Accept-Encoding: gzip, deflate` | |
| 117 | - * an array sorted by quality is returned: | |
| 118 | - * | |
| 119 | - * ['gzip', 'deflate'] | |
| 120 | - * | |
| 121 | - * @param {String|Array} encodings... | |
| 122 | - * @return {String|Array} | |
| 123 | - * @public | |
| 124 | - */ | |
| 125 | - | |
| 126 | -Accepts.prototype.encoding = | |
| 127 | -Accepts.prototype.encodings = function (encodings_) { | |
| 128 | - var encodings = encodings_ | |
| 129 | - | |
| 130 | - // support flattened arguments | |
| 131 | - if (encodings && !Array.isArray(encodings)) { | |
| 132 | - encodings = new Array(arguments.length) | |
| 133 | - for (var i = 0; i < encodings.length; i++) { | |
| 134 | - encodings[i] = arguments[i] | |
| 135 | - } | |
| 136 | - } | |
| 137 | - | |
| 138 | - // no encodings, return all requested encodings | |
| 139 | - if (!encodings || encodings.length === 0) { | |
| 140 | - return this.negotiator.encodings() | |
| 141 | - } | |
| 142 | - | |
| 143 | - return this.negotiator.encodings(encodings)[0] || false | |
| 144 | -} | |
| 145 | - | |
| 146 | -/** | |
| 147 | - * Return accepted charsets or best fit based on `charsets`. | |
| 148 | - * | |
| 149 | - * Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5` | |
| 150 | - * an array sorted by quality is returned: | |
| 151 | - * | |
| 152 | - * ['utf-8', 'utf-7', 'iso-8859-1'] | |
| 153 | - * | |
| 154 | - * @param {String|Array} charsets... | |
| 155 | - * @return {String|Array} | |
| 156 | - * @public | |
| 157 | - */ | |
| 158 | - | |
| 159 | -Accepts.prototype.charset = | |
| 160 | -Accepts.prototype.charsets = function (charsets_) { | |
| 161 | - var charsets = charsets_ | |
| 162 | - | |
| 163 | - // support flattened arguments | |
| 164 | - if (charsets && !Array.isArray(charsets)) { | |
| 165 | - charsets = new Array(arguments.length) | |
| 166 | - for (var i = 0; i < charsets.length; i++) { | |
| 167 | - charsets[i] = arguments[i] | |
| 168 | - } | |
| 169 | - } | |
| 170 | - | |
| 171 | - // no charsets, return all requested charsets | |
| 172 | - if (!charsets || charsets.length === 0) { | |
| 173 | - return this.negotiator.charsets() | |
| 174 | - } | |
| 175 | - | |
| 176 | - return this.negotiator.charsets(charsets)[0] || false | |
| 177 | -} | |
| 178 | - | |
| 179 | -/** | |
| 180 | - * Return accepted languages or best fit based on `langs`. | |
| 181 | - * | |
| 182 | - * Given `Accept-Language: en;q=0.8, es, pt` | |
| 183 | - * an array sorted by quality is returned: | |
| 184 | - * | |
| 185 | - * ['es', 'pt', 'en'] | |
| 186 | - * | |
| 187 | - * @param {String|Array} langs... | |
| 188 | - * @return {Array|String} | |
| 189 | - * @public | |
| 190 | - */ | |
| 191 | - | |
| 192 | -Accepts.prototype.lang = | |
| 193 | -Accepts.prototype.langs = | |
| 194 | -Accepts.prototype.language = | |
| 195 | -Accepts.prototype.languages = function (languages_) { | |
| 196 | - var languages = languages_ | |
| 197 | - | |
| 198 | - // support flattened arguments | |
| 199 | - if (languages && !Array.isArray(languages)) { | |
| 200 | - languages = new Array(arguments.length) | |
| 201 | - for (var i = 0; i < languages.length; i++) { | |
| 202 | - languages[i] = arguments[i] | |
| 203 | - } | |
| 204 | - } | |
| 205 | - | |
| 206 | - // no languages, return all requested languages | |
| 207 | - if (!languages || languages.length === 0) { | |
| 208 | - return this.negotiator.languages() | |
| 209 | - } | |
| 210 | - | |
| 211 | - return this.negotiator.languages(languages)[0] || false | |
| 212 | -} | |
| 213 | - | |
| 214 | -/** | |
| 215 | - * Convert extnames to mime. | |
| 216 | - * | |
| 217 | - * @param {String} type | |
| 218 | - * @return {String} | |
| 219 | - * @private | |
| 220 | - */ | |
| 221 | - | |
| 222 | -function extToMime (type) { | |
| 223 | - return type.indexOf('/') === -1 | |
| 224 | - ? mime.lookup(type) | |
| 225 | - : type | |
| 226 | -} | |
| 227 | - | |
| 228 | -/** | |
| 229 | - * Check if mime is valid. | |
| 230 | - * | |
| 231 | - * @param {String} type | |
| 232 | - * @return {String} | |
| 233 | - * @private | |
| 234 | - */ | |
| 235 | - | |
| 236 | -function validMime (type) { | |
| 237 | - return typeof type === 'string' | |
| 238 | -} |
node_modules/accepts/package.json
| ... | ... | @@ -1,85 +0,0 @@ |
| 1 | -{ | |
| 2 | - "_from": "accepts@~1.3.5", | |
| 3 | - "_id": "accepts@1.3.5", | |
| 4 | - "_inBundle": false, | |
| 5 | - "_integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", | |
| 6 | - "_location": "/accepts", | |
| 7 | - "_phantomChildren": {}, | |
| 8 | - "_requested": { | |
| 9 | - "type": "range", | |
| 10 | - "registry": true, | |
| 11 | - "raw": "accepts@~1.3.5", | |
| 12 | - "name": "accepts", | |
| 13 | - "escapedName": "accepts", | |
| 14 | - "rawSpec": "~1.3.5", | |
| 15 | - "saveSpec": null, | |
| 16 | - "fetchSpec": "~1.3.5" | |
| 17 | - }, | |
| 18 | - "_requiredBy": [ | |
| 19 | - "/express" | |
| 20 | - ], | |
| 21 | - "_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", | |
| 22 | - "_shasum": "eb777df6011723a3b14e8a72c0805c8e86746bd2", | |
| 23 | - "_spec": "accepts@~1.3.5", | |
| 24 | - "_where": "C:\\Users\\admin\\Documents\\express-project\\node_modules\\express", | |
| 25 | - "bugs": { | |
| 26 | - "url": "https://github.com/jshttp/accepts/issues" | |
| 27 | - }, | |
| 28 | - "bundleDependencies": false, | |
| 29 | - "contributors": [ | |
| 30 | - { | |
| 31 | - "name": "Douglas Christopher Wilson", | |
| 32 | - "email": "doug@somethingdoug.com" | |
| 33 | - }, | |
| 34 | - { | |
| 35 | - "name": "Jonathan Ong", | |
| 36 | - "email": "me@jongleberry.com", | |
| 37 | - "url": "http://jongleberry.com" | |
| 38 | - } | |
| 39 | - ], | |
| 40 | - "dependencies": { | |
| 41 | - "mime-types": "~2.1.18", | |
| 42 | - "negotiator": "0.6.1" | |
| 43 | - }, | |
| 44 | - "deprecated": false, | |
| 45 | - "description": "Higher-level content negotiation", | |
| 46 | - "devDependencies": { | |
| 47 | - "eslint": "4.18.1", | |
| 48 | - "eslint-config-standard": "11.0.0", | |
| 49 | - "eslint-plugin-import": "2.9.0", | |
| 50 | - "eslint-plugin-markdown": "1.0.0-beta.6", | |
| 51 | - "eslint-plugin-node": "6.0.1", | |
| 52 | - "eslint-plugin-promise": "3.6.0", | |
| 53 | - "eslint-plugin-standard": "3.0.1", | |
| 54 | - "istanbul": "0.4.5", | |
| 55 | - "mocha": "~1.21.5" | |
| 56 | - }, | |
| 57 | - "engines": { | |
| 58 | - "node": ">= 0.6" | |
| 59 | - }, | |
| 60 | - "files": [ | |
| 61 | - "LICENSE", | |
| 62 | - "HISTORY.md", | |
| 63 | - "index.js" | |
| 64 | - ], | |
| 65 | - "homepage": "https://github.com/jshttp/accepts#readme", | |
| 66 | - "keywords": [ | |
| 67 | - "content", | |
| 68 | - "negotiation", | |
| 69 | - "accept", | |
| 70 | - "accepts" | |
| 71 | - ], | |
| 72 | - "license": "MIT", | |
| 73 | - "name": "accepts", | |
| 74 | - "repository": { | |
| 75 | - "type": "git", | |
| 76 | - "url": "git+https://github.com/jshttp/accepts.git" | |
| 77 | - }, | |
| 78 | - "scripts": { | |
| 79 | - "lint": "eslint --plugin markdown --ext js,md .", | |
| 80 | - "test": "mocha --reporter spec --check-leaks --bail test/", | |
| 81 | - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", | |
| 82 | - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" | |
| 83 | - }, | |
| 84 | - "version": "1.3.5" | |
| 85 | -} |
node_modules/align-text/LICENSE
| ... | ... | @@ -1,21 +0,0 @@ |
| 1 | -The MIT License (MIT) | |
| 2 | - | |
| 3 | -Copyright (c) 2015, Jon Schlinkert. | |
| 4 | - | |
| 5 | -Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 6 | -of this software and associated documentation files (the "Software"), to deal | |
| 7 | -in the Software without restriction, including without limitation the rights | |
| 8 | -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| 9 | -copies of the Software, and to permit persons to whom the Software is | |
| 10 | -furnished to do so, subject to the following conditions: | |
| 11 | - | |
| 12 | -The above copyright notice and this permission notice shall be included in | |
| 13 | -all copies or substantial portions of the Software. | |
| 14 | - | |
| 15 | -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 16 | -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 17 | -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 18 | -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 19 | -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
| 20 | -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
| 21 | -THE SOFTWARE. |
node_modules/align-text/README.md
| ... | ... | @@ -1,236 +0,0 @@ |
| 1 | -# align-text [](http://badge.fury.io/js/align-text) [](https://travis-ci.org/jonschlinkert/align-text) | |
| 2 | - | |
| 3 | -> Align the text in a string. | |
| 4 | - | |
| 5 | -**Examples** | |
| 6 | - | |
| 7 | -Align text values in an array: | |
| 8 | - | |
| 9 | -```js | |
| 10 | -align([1, 2, 3, 100]); | |
| 11 | -//=> [' 1', ' 2', ' 3', '100'] | |
| 12 | -``` | |
| 13 | - | |
| 14 | -Or [do stuff like this](./example.js): | |
| 15 | - | |
| 16 | -[](./example.js) | |
| 17 | - | |
| 18 | -Visit [the example](./example.js) to see how this works. | |
| 19 | - | |
| 20 | -## Install | |
| 21 | - | |
| 22 | -Install with [npm](https://www.npmjs.com/) | |
| 23 | - | |
| 24 | -```sh | |
| 25 | -$ npm i align-text --save | |
| 26 | -``` | |
| 27 | - | |
| 28 | -## Usage | |
| 29 | - | |
| 30 | -```js | |
| 31 | -var align = require('align-text'); | |
| 32 | -align(text, callback_function_or_integer); | |
| 33 | -``` | |
| 34 | - | |
| 35 | -**Params** | |
| 36 | - | |
| 37 | -* `text` can be a **string or array**. If a string is passed, a string will be returned. If an array is passed, an array will be returned. | |
| 38 | -* `callback|integer`: if an integer, the text will be indented by that amount. If a function, it must return an integer representing the amount of leading indentation to use as `align` loops over each line. | |
| 39 | - | |
| 40 | -**Example** | |
| 41 | - | |
| 42 | -```js | |
| 43 | -align(text, 4); | |
| 44 | -``` | |
| 45 | - | |
| 46 | -Would align: | |
| 47 | - | |
| 48 | -``` | |
| 49 | -abc | |
| 50 | -abc | |
| 51 | -abc | |
| 52 | -``` | |
| 53 | - | |
| 54 | -To: | |
| 55 | - | |
| 56 | -``` | |
| 57 | - abc | |
| 58 | - abc | |
| 59 | - abc | |
| 60 | -``` | |
| 61 | - | |
| 62 | -## callback | |
| 63 | - | |
| 64 | -### params | |
| 65 | - | |
| 66 | -The callback is used to determine the indentation of each line and gets the following params: | |
| 67 | - | |
| 68 | -* `len` the length of the "current" line | |
| 69 | -* `longest` the length of the longest line | |
| 70 | -* `line` the current line (string) being aligned | |
| 71 | -* `lines` the array of all lines | |
| 72 | - | |
| 73 | -### return | |
| 74 | - | |
| 75 | -The callback may return: | |
| 76 | - | |
| 77 | -* an integer that represents the number of spaces to use for padding, | |
| 78 | -* or an object with the following properties: | |
| 79 | - - `indent`: **{Number}** the amount of indentation to use. Default is `0` when an object is returned. | |
| 80 | - - `character`: **{String}** the character to use for indentation. Default is `''` (empty string) when an object is returned. | |
| 81 | - - `prefix`: **{String}** leading characters to use at the beginning of each line. `''` (empty string) when an object is returned. | |
| 82 | - | |
| 83 | -**Integer example:** | |
| 84 | - | |
| 85 | -```js | |
| 86 | -// calculate half the difference between the length | |
| 87 | -// of the current line and the longest line | |
| 88 | -function centerAlign(len, longest, line, lines) { | |
| 89 | - return Math.floor((longest - len) / 2); | |
| 90 | -} | |
| 91 | -``` | |
| 92 | - | |
| 93 | -**Object example:** | |
| 94 | - | |
| 95 | -```js | |
| 96 | -function centerAlign(len, longest, line, lines) { | |
| 97 | - return { | |
| 98 | - character: '\t', | |
| 99 | - indent: Math.floor((longest - len) / 2), | |
| 100 | - prefix: '~ ', | |
| 101 | - } | |
| 102 | -} | |
| 103 | -``` | |
| 104 | - | |
| 105 | -## Usage examples | |
| 106 | - | |
| 107 | -### Center align | |
| 108 | - | |
| 109 | -Using the `centerAlign` function from above: | |
| 110 | - | |
| 111 | -```js | |
| 112 | -align(text, centerAlign); | |
| 113 | -``` | |
| 114 | - | |
| 115 | -Would align this text: | |
| 116 | - | |
| 117 | -```js | |
| 118 | -Lorem ipsum dolor sit amet | |
| 119 | -consectetur adipiscin | |
| 120 | -elit, sed do eiusmod tempor incididun | |
| 121 | -ut labore et dolor | |
| 122 | -magna aliqua. Ut enim ad mini | |
| 123 | -veniam, quis | |
| 124 | -``` | |
| 125 | - | |
| 126 | -Resulting in this: | |
| 127 | - | |
| 128 | -``` | |
| 129 | - Lorem ipsum dolor sit amet, | |
| 130 | - consectetur adipiscing | |
| 131 | -elit, sed do eiusmod tempor incididunt | |
| 132 | - ut labore et dolore | |
| 133 | - magna aliqua. Ut enim ad minim | |
| 134 | - veniam, quis | |
| 135 | -``` | |
| 136 | - | |
| 137 | -**Customize** | |
| 138 | - | |
| 139 | -If you wanted to add more padding on the left, just pass the number in the callback. | |
| 140 | - | |
| 141 | -For example, to add 4 spaces before every line: | |
| 142 | - | |
| 143 | -```js | |
| 144 | -function centerAlign(len, longest, line, lines) { | |
| 145 | - return 4 + Math.floor((longest - len) / 2); | |
| 146 | -} | |
| 147 | -``` | |
| 148 | - | |
| 149 | -Would result in: | |
| 150 | - | |
| 151 | -``` | |
| 152 | - Lorem ipsum dolor sit amet, | |
| 153 | - consectetur adipiscing | |
| 154 | - elit, sed do eiusmod tempor incididunt | |
| 155 | - ut labore et dolore | |
| 156 | - magna aliqua. Ut enim ad minim | |
| 157 | - veniam, quis | |
| 158 | -``` | |
| 159 | - | |
| 160 | -### Bullets | |
| 161 | - | |
| 162 | -```js | |
| 163 | -align(text, function (len, max, line, lines) { | |
| 164 | - return {prefix: ' - '}; | |
| 165 | -}); | |
| 166 | -``` | |
| 167 | - | |
| 168 | -Would return: | |
| 169 | - | |
| 170 | -``` | |
| 171 | -- Lorem ipsum dolor sit amet, | |
| 172 | -- consectetur adipiscing | |
| 173 | -- elit, sed do eiusmod tempor incididunt | |
| 174 | -- ut labore et dolore | |
| 175 | -- magna aliqua. Ut enim ad minim | |
| 176 | -- veniam, quis | |
| 177 | -``` | |
| 178 | - | |
| 179 | -### Different indent character | |
| 180 | - | |
| 181 | -```js | |
| 182 | -align(text, function (len, max, line, lines) { | |
| 183 | - return { | |
| 184 | - indent: Math.floor((max - len) / 2), | |
| 185 | - character: '~', | |
| 186 | - }; | |
| 187 | -}); | |
| 188 | -``` | |
| 189 | - | |
| 190 | -Would return | |
| 191 | - | |
| 192 | -``` | |
| 193 | -~~~~~Lorem ipsum dolor sit amet, | |
| 194 | -~~~~~~~~consectetur adipiscing | |
| 195 | -elit, sed do eiusmod tempor incididunt | |
| 196 | -~~~~~~~~~ut labore et dolore | |
| 197 | -~~~~magna aliqua. Ut enim ad minim | |
| 198 | -~~~~~~~~~~~~~veniam, quis | |
| 199 | -``` | |
| 200 | - | |
| 201 | -## Related projects | |
| 202 | - | |
| 203 | -* [center-align](https://github.com/jonschlinkert/center-align): Center-align the text in a string. | |
| 204 | -* [justify](https://github.com/bahamas10/node-justify): Left or right (or both) justify text using a custom width and character | |
| 205 | -* [longest](https://github.com/jonschlinkert/longest): Get the longest item in an array. | |
| 206 | -* [right-align](https://github.com/jonschlinkert/right-align): Right-align the text in a string. | |
| 207 | -* [repeat-string](https://github.com/jonschlinkert/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. | |
| 208 | -* [word-wrap](https://github.com/jonschlinkert/word-wrap): Wrap words to a specified length. | |
| 209 | - | |
| 210 | -## Running tests | |
| 211 | - | |
| 212 | -Install dev dependencies: | |
| 213 | - | |
| 214 | -```sh | |
| 215 | -$ npm i -d && npm test | |
| 216 | -``` | |
| 217 | - | |
| 218 | -## Contributing | |
| 219 | - | |
| 220 | -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/align-text/issues/new) | |
| 221 | - | |
| 222 | -## Author | |
| 223 | - | |
| 224 | -**Jon Schlinkert** | |
| 225 | - | |
| 226 | -+ [github/jonschlinkert](https://github.com/jonschlinkert) | |
| 227 | -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) | |
| 228 | - | |
| 229 | -## License | |
| 230 | - | |
| 231 | -Copyright ยฉ 2015 [Jon Schlinkert](https://github.com/jonschlinkert) | |
| 232 | -Released under the MIT license. | |
| 233 | - | |
| 234 | -*** | |
| 235 | - | |
| 236 | -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 09, 2015._ |
node_modules/align-text/index.js
| ... | ... | @@ -1,52 +0,0 @@ |
| 1 | -/*! | |
| 2 | - * align-text <https://github.com/jonschlinkert/align-text> | |
| 3 | - * | |
| 4 | - * Copyright (c) 2015, Jon Schlinkert. | |
| 5 | - * Licensed under the MIT License. | |
| 6 | - */ | |
| 7 | - | |
| 8 | -'use strict'; | |
| 9 | - | |
| 10 | -var typeOf = require('kind-of'); | |
| 11 | -var repeat = require('repeat-string'); | |
| 12 | -var longest = require('longest'); | |
| 13 | - | |
| 14 | -module.exports = function alignText(val, fn) { | |
| 15 | - var lines, type = typeOf(val); | |
| 16 | - | |
| 17 | - if (type === 'array') { | |
| 18 | - lines = val; | |
| 19 | - } else if (type === 'string') { | |
| 20 | - lines = val.split(/(?:\r\n|\n)/); | |
| 21 | - } else { | |
| 22 | - throw new TypeError('align-text expects a string or array.'); | |
| 23 | - } | |
| 24 | - | |
| 25 | - var fnType = typeOf(fn); | |
| 26 | - var len = lines.length; | |
| 27 | - var max = longest(lines); | |
| 28 | - var res = [], i = 0; | |
| 29 | - | |
| 30 | - while (len--) { | |
| 31 | - var line = String(lines[i++]); | |
| 32 | - var diff; | |
| 33 | - | |
| 34 | - if (fnType === 'function') { | |
| 35 | - diff = fn(line.length, max.length, line, lines, i); | |
| 36 | - } else if (fnType === 'number') { | |
| 37 | - diff = fn; | |
| 38 | - } else { | |
| 39 | - diff = max.length - line.length; | |
| 40 | - } | |
| 41 | - | |
| 42 | - if (typeOf(diff) === 'number') { | |
| 43 | - res.push(repeat(' ', diff) + line); | |
| 44 | - } else if (typeOf(diff) === 'object') { | |
| 45 | - var result = repeat(diff.character || ' ', diff.indent || 0); | |
| 46 | - res.push((diff.prefix || '') + result + line); | |
| 47 | - } | |
| 48 | - } | |
| 49 | - | |
| 50 | - if (type === 'array') return res; | |
| 51 | - return res.join('\n'); | |
| 52 | -}; |
node_modules/align-text/package.json
| ... | ... | @@ -1,78 +0,0 @@ |
| 1 | -{ | |
| 2 | - "_from": "align-text@^0.1.3", | |
| 3 | - "_id": "align-text@0.1.4", | |
| 4 | - "_inBundle": false, | |
| 5 | - "_integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", | |
| 6 | - "_location": "/align-text", | |
| 7 | - "_phantomChildren": {}, | |
| 8 | - "_requested": { | |
| 9 | - "type": "range", | |
| 10 | - "registry": true, | |
| 11 | - "raw": "align-text@^0.1.3", | |
| 12 | - "name": "align-text", | |
| 13 | - "escapedName": "align-text", | |
| 14 | - "rawSpec": "^0.1.3", | |
| 15 | - "saveSpec": null, | |
| 16 | - "fetchSpec": "^0.1.3" | |
| 17 | - }, | |
| 18 | - "_requiredBy": [ | |
| 19 | - "/center-align", | |
| 20 | - "/right-align" | |
| 21 | - ], | |
| 22 | - "_resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", | |
| 23 | - "_shasum": "0cd90a561093f35d0a99256c22b7069433fad117", | |
| 24 | - "_spec": "align-text@^0.1.3", | |
| 25 | - "_where": "C:\\Users\\admin\\Documents\\express-project\\node_modules\\center-align", | |
| 26 | - "author": { | |
| 27 | - "name": "Jon Schlinkert", | |
| 28 | - "url": "https://github.com/jonschlinkert" | |
| 29 | - }, | |
| 30 | - "bugs": { | |
| 31 | - "url": "https://github.com/jonschlinkert/align-text/issues" | |
| 32 | - }, | |
| 33 | - "bundleDependencies": false, | |
| 34 | - "dependencies": { | |
| 35 | - "kind-of": "^3.0.2", | |
| 36 | - "longest": "^1.0.1", | |
| 37 | - "repeat-string": "^1.5.2" | |
| 38 | - }, | |
| 39 | - "deprecated": false, | |
| 40 | - "description": "Align the text in a string.", | |
| 41 | - "devDependencies": { | |
| 42 | - "mocha": "*", | |
| 43 | - "should": "*", | |
| 44 | - "word-wrap": "^1.0.3" | |
| 45 | - }, | |
| 46 | - "engines": { | |
| 47 | - "node": ">=0.10.0" | |
| 48 | - }, | |
| 49 | - "files": [ | |
| 50 | - "index.js" | |
| 51 | - ], | |
| 52 | - "homepage": "https://github.com/jonschlinkert/align-text", | |
| 53 | - "keywords": [ | |
| 54 | - "align", | |
| 55 | - "align-center", | |
| 56 | - "alignment", | |
| 57 | - "center", | |
| 58 | - "center-align", | |
| 59 | - "indent", | |
| 60 | - "pad", | |
| 61 | - "padding", | |
| 62 | - "right", | |
| 63 | - "right-align", | |
| 64 | - "text", | |
| 65 | - "typography" | |
| 66 | - ], | |
| 67 | - "license": "MIT", | |
| 68 | - "main": "index.js", | |
| 69 | - "name": "align-text", | |
| 70 | - "repository": { | |
| 71 | - "type": "git", | |
| 72 | - "url": "git://github.com/jonschlinkert/align-text.git" | |
| 73 | - }, | |
| 74 | - "scripts": { | |
| 75 | - "test": "mocha" | |
| 76 | - }, | |
| 77 | - "version": "0.1.4" | |
| 78 | -} |
node_modules/ansi-regex/index.js
node_modules/ansi-regex/license
| ... | ... | @@ -1,21 +0,0 @@ |
| 1 | -The MIT License (MIT) | |
| 2 | - | |
| 3 | -Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) | |
| 4 | - | |
| 5 | -Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 6 | -of this software and associated documentation files (the "Software"), to deal | |
| 7 | -in the Software without restriction, including without limitation the rights | |
| 8 | -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| 9 | -copies of the Software, and to permit persons to whom the Software is | |
| 10 | -furnished to do so, subject to the following conditions: | |
| 11 | - | |
| 12 | -The above copyright notice and this permission notice shall be included in | |
| 13 | -all copies or substantial portions of the Software. | |
| 14 | - | |
| 15 | -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 16 | -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 17 | -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 18 | -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 19 | -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
| 20 | -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
| 21 | -THE SOFTWARE. |
node_modules/ansi-regex/package.json
| ... | ... | @@ -1,109 +0,0 @@ |
| 1 | -{ | |
| 2 | - "_from": "ansi-regex@^2.0.0", | |
| 3 | - "_id": "ansi-regex@2.1.1", | |
| 4 | - "_inBundle": false, | |
| 5 | - "_integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", | |
| 6 | - "_location": "/ansi-regex", | |
| 7 | - "_phantomChildren": {}, | |
| 8 | - "_requested": { | |
| 9 | - "type": "range", | |
| 10 | - "registry": true, | |
| 11 | - "raw": "ansi-regex@^2.0.0", | |
| 12 | - "name": "ansi-regex", | |
| 13 | - "escapedName": "ansi-regex", | |
| 14 | - "rawSpec": "^2.0.0", | |
| 15 | - "saveSpec": null, | |
| 16 | - "fetchSpec": "^2.0.0" | |
| 17 | - }, | |
| 18 | - "_requiredBy": [ | |
| 19 | - "/has-ansi", | |
| 20 | - "/strip-ansi" | |
| 21 | - ], | |
| 22 | - "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", | |
| 23 | - "_shasum": "c3b33ab5ee360d86e0e628f0468ae7ef27d654df", | |
| 24 | - "_spec": "ansi-regex@^2.0.0", | |
| 25 | - "_where": "C:\\Users\\admin\\Documents\\express-project\\node_modules\\has-ansi", | |
| 26 | - "author": { | |
| 27 | - "name": "Sindre Sorhus", | |
| 28 | - "email": "sindresorhus@gmail.com", | |
| 29 | - "url": "sindresorhus.com" | |
| 30 | - }, | |
| 31 | - "bugs": { | |
| 32 | - "url": "https://github.com/chalk/ansi-regex/issues" | |
| 33 | - }, | |
| 34 | - "bundleDependencies": false, | |
| 35 | - "deprecated": false, | |
| 36 | - "description": "Regular expression for matching ANSI escape codes", | |
| 37 | - "devDependencies": { | |
| 38 | - "ava": "0.17.0", | |
| 39 | - "xo": "0.16.0" | |
| 40 | - }, | |
| 41 | - "engines": { | |
| 42 | - "node": ">=0.10.0" | |
| 43 | - }, | |
| 44 | - "files": [ | |
| 45 | - "index.js" | |
| 46 | - ], | |
| 47 | - "homepage": "https://github.com/chalk/ansi-regex#readme", | |
| 48 | - "keywords": [ | |
| 49 | - "ansi", | |
| 50 | - "styles", | |
| 51 | - "color", | |
| 52 | - "colour", | |
| 53 | - "colors", | |
| 54 | - "terminal", | |
| 55 | - "console", | |
| 56 | - "cli", | |
| 57 | - "string", | |
| 58 | - "tty", | |
| 59 | - "escape", | |
| 60 | - "formatting", | |
| 61 | - "rgb", | |
| 62 | - "256", | |
| 63 | - "shell", | |
| 64 | - "xterm", | |
| 65 | - "command-line", | |
| 66 | - "text", | |
| 67 | - "regex", | |
| 68 | - "regexp", | |
| 69 | - "re", | |
| 70 | - "match", | |
| 71 | - "test", | |
| 72 | - "find", | |
| 73 | - "pattern" | |
| 74 | - ], | |
| 75 | - "license": "MIT", | |
| 76 | - "maintainers": [ | |
| 77 | - { | |
| 78 | - "name": "Sindre Sorhus", | |
| 79 | - "email": "sindresorhus@gmail.com", | |
| 80 | - "url": "sindresorhus.com" | |
| 81 | - }, | |
| 82 | - { | |
| 83 | - "name": "Joshua Appelman", | |
| 84 | - "email": "jappelman@xebia.com", | |
| 85 | - "url": "jbnicolai.com" | |
| 86 | - }, | |
| 87 | - { | |
| 88 | - "name": "JD Ballard", | |
| 89 | - "email": "i.am.qix@gmail.com", | |
| 90 | - "url": "github.com/qix-" | |
| 91 | - } | |
| 92 | - ], | |
| 93 | - "name": "ansi-regex", | |
| 94 | - "repository": { | |
| 95 | - "type": "git", | |
| 96 | - "url": "git+https://github.com/chalk/ansi-regex.git" | |
| 97 | - }, | |
| 98 | - "scripts": { | |
| 99 | - "test": "xo && ava --verbose", | |
| 100 | - "view-supported": "node fixtures/view-codes.js" | |
| 101 | - }, | |
| 102 | - "version": "2.1.1", | |
| 103 | - "xo": { | |
| 104 | - "rules": { | |
| 105 | - "guard-for-in": 0, | |
| 106 | - "no-loop-func": 0 | |
| 107 | - } | |
| 108 | - } | |
| 109 | -} |
node_modules/ansi-regex/readme.md
| ... | ... | @@ -1,39 +0,0 @@ |
| 1 | -# ansi-regex [](https://travis-ci.org/chalk/ansi-regex) | |
| 2 | - | |
| 3 | -> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) | |
| 4 | - | |
| 5 | - | |
| 6 | -## Install | |
| 7 | - | |
| 8 | -``` | |
| 9 | -$ npm install --save ansi-regex | |
| 10 | -``` | |
| 11 | - | |
| 12 | - | |
| 13 | -## Usage | |
| 14 | - | |
| 15 | -```js | |
| 16 | -const ansiRegex = require('ansi-regex'); | |
| 17 | - | |
| 18 | -ansiRegex().test('\u001b[4mcake\u001b[0m'); | |
| 19 | -//=> true | |
| 20 | - | |
| 21 | -ansiRegex().test('cake'); | |
| 22 | -//=> false | |
| 23 | - | |
| 24 | -'\u001b[4mcake\u001b[0m'.match(ansiRegex()); | |
| 25 | -//=> ['\u001b[4m', '\u001b[0m'] | |
| 26 | -``` | |
| 27 | - | |
| 28 | -## FAQ | |
| 29 | - | |
| 30 | -### Why do you test for codes not in the ECMA 48 standard? | |
| 31 | - | |
| 32 | -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. | |
| 33 | - | |
| 34 | -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. | |
| 35 | - | |
| 36 | - | |
| 37 | -## License | |
| 38 | - | |
| 39 | -MIT ยฉ [Sindre Sorhus](http://sindresorhus.com) |
node_modules/ansi-styles/index.js
| ... | ... | @@ -1,65 +0,0 @@ |
| 1 | -'use strict'; | |
| 2 | - | |
| 3 | -function assembleStyles () { | |
| 4 | - var styles = { | |
| 5 | - modifiers: { | |
| 6 | - reset: [0, 0], | |
| 7 | - bold: [1, 22], // 21 isn't widely supported and 22 does the same thing | |
| 8 | - dim: [2, 22], | |
| 9 | - italic: [3, 23], | |
| 10 | - underline: [4, 24], | |
| 11 | - inverse: [7, 27], | |
| 12 | - hidden: [8, 28], | |
| 13 | - strikethrough: [9, 29] | |
| 14 | - }, | |
| 15 | - colors: { | |
| 16 | - black: [30, 39], | |
| 17 | - red: [31, 39], | |
| 18 | - green: [32, 39], | |
| 19 | - yellow: [33, 39], | |
| 20 | - blue: [34, 39], | |
| 21 | - magenta: [35, 39], | |
| 22 | - cyan: [36, 39], | |
| 23 | - white: [37, 39], | |
| 24 | - gray: [90, 39] | |
| 25 | - }, | |
| 26 | - bgColors: { | |
| 27 | - bgBlack: [40, 49], | |
| 28 | - bgRed: [41, 49], | |
| 29 | - bgGreen: [42, 49], | |
| 30 | - bgYellow: [43, 49], | |
| 31 | - bgBlue: [44, 49], | |
| 32 | - bgMagenta: [45, 49], | |
| 33 | - bgCyan: [46, 49], | |
| 34 | - bgWhite: [47, 49] | |
| 35 | - } | |
| 36 | - }; | |
| 37 | - | |
| 38 | - // fix humans | |
| 39 | - styles.colors.grey = styles.colors.gray; | |
| 40 | - | |
| 41 | - Object.keys(styles).forEach(function (groupName) { | |
| 42 | - var group = styles[groupName]; | |
| 43 | - | |
| 44 | - Object.keys(group).forEach(function (styleName) { | |
| 45 | - var style = group[styleName]; | |
| 46 | - | |
| 47 | - styles[styleName] = group[styleName] = { | |
| 48 | - open: '\u001b[' + style[0] + 'm', | |
| 49 | - close: '\u001b[' + style[1] + 'm' | |
| 50 | - }; | |
| 51 | - }); | |
| 52 | - | |
| 53 | - Object.defineProperty(styles, groupName, { | |
| 54 | - value: group, | |
| 55 | - enumerable: false | |
| 56 | - }); | |
| 57 | - }); | |
| 58 | - | |
| 59 | - return styles; | |
| 60 | -} | |
| 61 | - | |
| 62 | -Object.defineProperty(module, 'exports', { | |
| 63 | - enumerable: true, | |
| 64 | - get: assembleStyles | |
| 65 | -}); |
node_modules/ansi-styles/license
| ... | ... | @@ -1,21 +0,0 @@ |
| 1 | -The MIT License (MIT) | |
| 2 | - | |
| 3 | -Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) | |
| 4 | - | |
| 5 | -Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 6 | -of this software and associated documentation files (the "Software"), to deal | |
| 7 | -in the Software without restriction, including without limitation the rights | |
| 8 | -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| 9 | -copies of the Software, and to permit persons to whom the Software is | |
| 10 | -furnished to do so, subject to the following conditions: | |
| 11 | - | |
| 12 | -The above copyright notice and this permission notice shall be included in | |
| 13 | -all copies or substantial portions of the Software. | |
| 14 | - | |
| 15 | -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 16 | -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 17 | -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 18 | -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 19 | -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
| 20 | -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
| 21 | -THE SOFTWARE. |
node_modules/ansi-styles/package.json
| ... | ... | @@ -1,90 +0,0 @@ |
| 1 | -{ | |
| 2 | - "_from": "ansi-styles@^2.2.1", | |
| 3 | - "_id": "ansi-styles@2.2.1", | |
| 4 | - "_inBundle": false, | |
| 5 | - "_integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", | |
| 6 | - "_location": "/ansi-styles", | |
| 7 | - "_phantomChildren": {}, | |
| 8 | - "_requested": { | |
| 9 | - "type": "range", | |
| 10 | - "registry": true, | |
| 11 | - "raw": "ansi-styles@^2.2.1", | |
| 12 | - "name": "ansi-styles", | |
| 13 | - "escapedName": "ansi-styles", | |
| 14 | - "rawSpec": "^2.2.1", | |
| 15 | - "saveSpec": null, | |
| 16 | - "fetchSpec": "^2.2.1" | |
| 17 | - }, | |
| 18 | - "_requiredBy": [ | |
| 19 | - "/chalk" | |
| 20 | - ], | |
| 21 | - "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", | |
| 22 | - "_shasum": "b432dd3358b634cf75e1e4664368240533c1ddbe", | |
| 23 | - "_spec": "ansi-styles@^2.2.1", | |
| 24 | - "_where": "C:\\Users\\admin\\Documents\\express-project\\node_modules\\chalk", | |
| 25 | - "author": { | |
| 26 | - "name": "Sindre Sorhus", | |
| 27 | - "email": "sindresorhus@gmail.com", | |
| 28 | - "url": "sindresorhus.com" | |
| 29 | - }, | |
| 30 | - "bugs": { | |
| 31 | - "url": "https://github.com/chalk/ansi-styles/issues" | |
| 32 | - }, | |
| 33 | - "bundleDependencies": false, | |
| 34 | - "deprecated": false, | |
| 35 | - "description": "ANSI escape codes for styling strings in the terminal", | |
| 36 | - "devDependencies": { | |
| 37 | - "mocha": "*" | |
| 38 | - }, | |
| 39 | - "engines": { | |
| 40 | - "node": ">=0.10.0" | |
| 41 | - }, | |
| 42 | - "files": [ | |
| 43 | - "index.js" | |
| 44 | - ], | |
| 45 | - "homepage": "https://github.com/chalk/ansi-styles#readme", | |
| 46 | - "keywords": [ | |
| 47 | - "ansi", | |
| 48 | - "styles", | |
| 49 | - "color", | |
| 50 | - "colour", | |
| 51 | - "colors", | |
| 52 | - "terminal", | |
| 53 | - "console", | |
| 54 | - "cli", | |
| 55 | - "string", | |
| 56 | - "tty", | |
| 57 | - "escape", | |
| 58 | - "formatting", | |
| 59 | - "rgb", | |
| 60 | - "256", | |
| 61 | - "shell", | |
| 62 | - "xterm", | |
| 63 | - "log", | |
| 64 | - "logging", | |
| 65 | - "command-line", | |
| 66 | - "text" | |
| 67 | - ], | |
| 68 | - "license": "MIT", | |
| 69 | - "maintainers": [ | |
| 70 | - { | |
| 71 | - "name": "Sindre Sorhus", | |
| 72 | - "email": "sindresorhus@gmail.com", | |
| 73 | - "url": "sindresorhus.com" | |
| 74 | - }, | |
| 75 | - { | |
| 76 | - "name": "Joshua Appelman", | |
| 77 | - "email": "jappelman@xebia.com", | |
| 78 | - "url": "jbnicolai.com" | |
| 79 | - } | |
| 80 | - ], | |
| 81 | - "name": "ansi-styles", | |
| 82 | - "repository": { | |
| 83 | - "type": "git", | |
| 84 | - "url": "git+https://github.com/chalk/ansi-styles.git" | |
| 85 | - }, | |
| 86 | - "scripts": { | |
| 87 | - "test": "mocha" | |
| 88 | - }, | |
| 89 | - "version": "2.2.1" | |
| 90 | -} |
node_modules/ansi-styles/readme.md
| ... | ... | @@ -1,86 +0,0 @@ |
| 1 | -# ansi-styles [](https://travis-ci.org/chalk/ansi-styles) | |
| 2 | - | |
| 3 | -> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal | |
| 4 | - | |
| 5 | -You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. | |
| 6 | - | |
| 7 | - | |
| 8 | - | |
| 9 | - | |
| 10 | -## Install | |
| 11 | - | |
| 12 | -``` | |
| 13 | -$ npm install --save ansi-styles | |
| 14 | -``` | |
| 15 | - | |
| 16 | - | |
| 17 | -## Usage | |
| 18 | - | |
| 19 | -```js | |
| 20 | -var ansi = require('ansi-styles'); | |
| 21 | - | |
| 22 | -console.log(ansi.green.open + 'Hello world!' + ansi.green.close); | |
| 23 | -``` | |
| 24 | - | |
| 25 | - | |
| 26 | -## API | |
| 27 | - | |
| 28 | -Each style has an `open` and `close` property. | |
| 29 | - | |
| 30 | - | |
| 31 | -## Styles | |
| 32 | - | |
| 33 | -### Modifiers | |
| 34 | - | |
| 35 | -- `reset` | |
| 36 | -- `bold` | |
| 37 | -- `dim` | |
| 38 | -- `italic` *(not widely supported)* | |
| 39 | -- `underline` | |
| 40 | -- `inverse` | |
| 41 | -- `hidden` | |
| 42 | -- `strikethrough` *(not widely supported)* | |
| 43 | - | |
| 44 | -### Colors | |
| 45 | - | |
| 46 | -- `black` | |
| 47 | -- `red` | |
| 48 | -- `green` | |
| 49 | -- `yellow` | |
| 50 | -- `blue` | |
| 51 | -- `magenta` | |
| 52 | -- `cyan` | |
| 53 | -- `white` | |
| 54 | -- `gray` | |
| 55 | - | |
| 56 | -### Background colors | |
| 57 | - | |
| 58 | -- `bgBlack` | |
| 59 | -- `bgRed` | |
| 60 | -- `bgGreen` | |
| 61 | -- `bgYellow` | |
| 62 | -- `bgBlue` | |
| 63 | -- `bgMagenta` | |
| 64 | -- `bgCyan` | |
| 65 | -- `bgWhite` | |
| 66 | - | |
| 67 | - | |
| 68 | -## Advanced usage | |
| 69 | - | |
| 70 | -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. | |
| 71 | - | |
| 72 | -- `ansi.modifiers` | |
| 73 | -- `ansi.colors` | |
| 74 | -- `ansi.bgColors` | |
| 75 | - | |
| 76 | - | |
| 77 | -###### Example | |
| 78 | - | |
| 79 | -```js | |
| 80 | -console.log(ansi.colors.green.open); | |
| 81 | -``` | |
| 82 | - | |
| 83 | - | |
| 84 | -## License | |
| 85 | - | |
| 86 | -MIT ยฉ [Sindre Sorhus](http://sindresorhus.com) |
node_modules/app-module-path/.jshintrc
| ... | ... | @@ -1,30 +0,0 @@ |
| 1 | -{ | |
| 2 | - "node" : true, | |
| 3 | - "es5" : false, | |
| 4 | - "browser" : true, | |
| 5 | - "boss" : false, | |
| 6 | - "curly": false, | |
| 7 | - "debug": false, | |
| 8 | - "devel": false, | |
| 9 | - "eqeqeq": true, | |
| 10 | - "evil": true, | |
| 11 | - "forin": false, | |
| 12 | - "immed": true, | |
| 13 | - "laxbreak": false, | |
| 14 | - "newcap": true, | |
| 15 | - "noarg": true, | |
| 16 | - "noempty": false, | |
| 17 | - "nonew": true, | |
| 18 | - "nomen": false, | |
| 19 | - "onevar": false, | |
| 20 | - "plusplus": false, | |
| 21 | - "regexp": false, | |
| 22 | - "undef": true, | |
| 23 | - "sub": false, | |
| 24 | - "white": false, | |
| 25 | - "eqeqeq": false, | |
| 26 | - "latedef": "func", | |
| 27 | - "unused": "vars", | |
| 28 | - "strict": false, | |
| 29 | - "eqnull": true | |
| 30 | -} |
node_modules/app-module-path/.npmignore
node_modules/app-module-path/README.md
| ... | ... | @@ -1,133 +0,0 @@ |
| 1 | -[](https://nodei.co/npm/app-module-path/) | |
| 2 | - | |
| 3 | -app-module-path | |
| 4 | -===================== | |
| 5 | - | |
| 6 | -This simple module enables you to add additional directories to the Node.js module search path (for top-level app modules only). This allows application-level modules to be required as if they were installed into the `node_modules` directory. | |
| 7 | - | |
| 8 | -## Installation | |
| 9 | - | |
| 10 | -`npm install app-module-path --save` | |
| 11 | - | |
| 12 | -## Usage | |
| 13 | -```javascript | |
| 14 | -// ***IMPORTANT**: The following line should be added to the very | |
| 15 | -// beginning of your main script! | |
| 16 | -require('app-module-path').addPath(baseDir); | |
| 17 | -``` | |
| 18 | - | |
| 19 | -__IMPORTANT:__ | |
| 20 | -The search path should be modified before any modules are loaded! | |
| 21 | - | |
| 22 | -__Example:__ | |
| 23 | - | |
| 24 | -In your `my-app/index.js` (or `my-app/server.js`) file: | |
| 25 | -```javascript | |
| 26 | -// Add the root project directory to the app module search path: | |
| 27 | -require('app-module-path').addPath(__dirname); | |
| 28 | -``` | |
| 29 | - | |
| 30 | -Given the following example directory structure: | |
| 31 | - | |
| 32 | -- **my-app/** | |
| 33 | - - **src/** - Source code and application modules directory | |
| 34 | - - **foo/** - A module directory | |
| 35 | - - index.js | |
| 36 | - - **bar/** - Another module directory | |
| 37 | - - index.js | |
| 38 | - - **node_modules/** - Installed modules | |
| 39 | - - **installed-baz/** - An installed module | |
| 40 | - - index.js | |
| 41 | - - index.js - Main script | |
| 42 | - | |
| 43 | -The following will work for any modules under the `src` directory: | |
| 44 | -```javascript | |
| 45 | -// All of the following lines will work in "src/foo/index.js" and "src/bar/index.js": | |
| 46 | -var foo = require('src/foo'); // Works | |
| 47 | -var bar = require('src/bar'); // Works | |
| 48 | -var baz = require('installed-baz'); // Works | |
| 49 | -``` | |
| 50 | - | |
| 51 | -Lastly, by design, installed modules (i.e. modules under the `node_modules` directory) will not be able to require application-level modules so the following will ___not___ work: | |
| 52 | - | |
| 53 | -```javascript | |
| 54 | -// All of the following lines will *not* work in "node_modules/installed-baz/index.js"! | |
| 55 | -var foo = require('src/foo'); // Fails | |
| 56 | -var bar = require('src/bar'); // Fails | |
| 57 | -``` | |
| 58 | - | |
| 59 | -## Alternate Usage (`app-module-path/register`) | |
| 60 | - | |
| 61 | -This module supports an alternate method of adding a path to the Node.js module search path that requires less code. Requiring or importing the `app-module-path/register` module will result in the directory of the calling module being added to the Node.js module search path as shown below: | |
| 62 | - | |
| 63 | -## Explicitly enabling a directory/package | |
| 64 | - | |
| 65 | -By default, `app-module-path` will not attempt to resolve app modules from a directory that is found to be within a `node_modules` directory. This behavior can be changed by explicitly enabling `app-module-path` to work for descendent modules of a specific directory. For example: | |
| 66 | - | |
| 67 | -```javascript | |
| 68 | -var packageDir = path.dirname(require.resolve('installed-module-allowed')); | |
| 69 | -require('../').enableForDir(packageDir); | |
| 70 | -``` | |
| 71 | - | |
| 72 | - | |
| 73 | -### ES5 | |
| 74 | - | |
| 75 | -```javascript | |
| 76 | -require('app-module-path/register'); | |
| 77 | - | |
| 78 | -// Is equivalent to: | |
| 79 | -require('app-module-path').addPath(__dirname); | |
| 80 | -``` | |
| 81 | - | |
| 82 | -### ES6 | |
| 83 | - | |
| 84 | -```javascript | |
| 85 | -import "app-module-path/register"; | |
| 86 | - | |
| 87 | -// Is equivalent to: | |
| 88 | -import { addPath } from 'app-module-path'; | |
| 89 | -addPath(__dirname); | |
| 90 | -``` | |
| 91 | - | |
| 92 | -## Alternative Usage (`app-module-path/cwd`) | |
| 93 | - | |
| 94 | -Additionally, requiring or importing `app-module-path/cwd` will result in the current working directory of the Node.js process being added to the module search path as shown below: | |
| 95 | - | |
| 96 | -### ES5 | |
| 97 | - | |
| 98 | -```javascript | |
| 99 | -require('app-module-path/cwd'); | |
| 100 | - | |
| 101 | -// Is equivalent to: | |
| 102 | -require('app-module-path').addPath(process.cwd()); | |
| 103 | -``` | |
| 104 | - | |
| 105 | -### ES6 | |
| 106 | - | |
| 107 | -```javascript | |
| 108 | -import "app-module-path/cwd"; | |
| 109 | - | |
| 110 | -// Is equivalent to: | |
| 111 | -import { addPath } from 'app-module-path'; | |
| 112 | -addPath(process.cwd()); | |
| 113 | -``` | |
| 114 | - | |
| 115 | -## Additional Notes | |
| 116 | - | |
| 117 | -* __Search path order:__ | |
| 118 | - * App module paths will be added to the end of the default module search path. That is, if a module with the same name exists in both a `node_modules` directory and an application module directory then the module in the `node_modules` directory will be loaded since it is found first. | |
| 119 | - *This behavior is new in v2.x. In v1.x, this search order was reversed* | |
| 120 | - | |
| 121 | -* __Node.js compatibility:__ | |
| 122 | - * This module depends on overriding/wrapping a built-in Node.js method, and it is possible (but unlikely) that this behavior could be broken in a future release of Node.js (at which point a workaround would need to be used) | |
| 123 | - * This module will _not_ change or break modules installed into the `node_modules` directory. | |
| 124 | -* __Recommendations:__ | |
| 125 | - * Since this module changes the Node.js convention of how non-relative modules are resolved, it is recommended (but not required) to put all app modules in a common directory below the application root (such as `my-app/src` or `my-app/app_modules`) and then to add the application root to the search path. The require calls would then be something like `require('src/foo')` or `require('app_modules/foo')`. The common prefix makes it more clear that the module can be found in the application's modules directory and not in the `node_modules` directory. | |
| 126 | - | |
| 127 | - | |
| 128 | -## Contribute | |
| 129 | -Pull requests, bug reports and feature requests welcome. | |
| 130 | - | |
| 131 | -## License | |
| 132 | - | |
| 133 | -BSD-2-Clause |
node_modules/app-module-path/cwd.js
node_modules/app-module-path/lib/index.js
| ... | ... | @@ -1,108 +0,0 @@ |
| 1 | -var Module = require('module').Module; | |
| 2 | -var nodePath = require('path'); | |
| 3 | - | |
| 4 | -var appModulePaths = []; | |
| 5 | -var old_nodeModulePaths = Module._nodeModulePaths; | |
| 6 | -var allowedDirs = {}; | |
| 7 | - | |
| 8 | -function checkIfDirAllowed(from) { | |
| 9 | - var currentDir = from; | |
| 10 | - | |
| 11 | - while (currentDir) { | |
| 12 | - if (allowedDirs[currentDir]) { | |
| 13 | - return true; | |
| 14 | - } | |
| 15 | - | |
| 16 | - var basename = nodePath.basename(currentDir); | |
| 17 | - if (basename === 'node_modules') { | |
| 18 | - return false; | |
| 19 | - } | |
| 20 | - | |
| 21 | - var parentDir = nodePath.dirname(currentDir); | |
| 22 | - if (parentDir === currentDir) { | |
| 23 | - break; | |
| 24 | - } | |
| 25 | - currentDir = parentDir; | |
| 26 | - } | |
| 27 | - | |
| 28 | - return true; | |
| 29 | -} | |
| 30 | - | |
| 31 | -Module._nodeModulePaths = function(from) { | |
| 32 | - var paths = old_nodeModulePaths.call(this, from); | |
| 33 | - | |
| 34 | - // Only include the app module path for top-level modules | |
| 35 | - // that were not installed or that were explicitly allowed | |
| 36 | - if (checkIfDirAllowed(from)) { | |
| 37 | - paths = paths.concat(appModulePaths); | |
| 38 | - } | |
| 39 | - | |
| 40 | - return paths; | |
| 41 | -}; | |
| 42 | - | |
| 43 | -function enableForDir(dir) { | |
| 44 | - allowedDirs[dir] = true; | |
| 45 | -} | |
| 46 | - | |
| 47 | -function addPath(path, parent) { | |
| 48 | - // Anable app-module-path to work under any directories that are explicitly added | |
| 49 | - enableForDir(path); | |
| 50 | - | |
| 51 | - function addPathHelper(targetArray) { | |
| 52 | - path = nodePath.normalize(path); | |
| 53 | - if (targetArray && targetArray.indexOf(path) === -1) { | |
| 54 | - targetArray.push(path); | |
| 55 | - } | |
| 56 | - } | |
| 57 | - | |
| 58 | - path = nodePath.normalize(path); | |
| 59 | - | |
| 60 | - if (appModulePaths.indexOf(path) === -1) { | |
| 61 | - appModulePaths.push(path); | |
| 62 | - // Enable the search path for the current top-level module | |
| 63 | - if (require.main) { | |
| 64 | - addPathHelper(require.main.paths); | |
| 65 | - } | |
| 66 | - | |
| 67 | - parent = parent || module.parent; | |
| 68 | - | |
| 69 | - // Also modify the paths of the module that was used to load the app-module-paths module | |
| 70 | - // and all of it's parents | |
| 71 | - while(parent && parent !== require.main) { | |
| 72 | - addPathHelper(parent.paths); | |
| 73 | - parent = parent.parent; | |
| 74 | - } | |
| 75 | - } | |
| 76 | -} | |
| 77 | - | |
| 78 | -function removePath(path) { | |
| 79 | - function removePathHelper(targetArray) { | |
| 80 | - path = nodePath.normalize(path); | |
| 81 | - if (!targetArray) return; | |
| 82 | - var index = targetArray.indexOf(path); | |
| 83 | - if (index === -1) return; | |
| 84 | - targetArray.splice(index, 1); | |
| 85 | - } | |
| 86 | - | |
| 87 | - var parent; | |
| 88 | - path = nodePath.normalize(path); | |
| 89 | - var index = appModulePaths.indexOf(path); | |
| 90 | - | |
| 91 | - if (index > -1) { | |
| 92 | - appModulePaths.splice(index, 1); | |
| 93 | - // Enable the search path for the current top-level module | |
| 94 | - if (require.main) removePathHelper(require.main.paths); | |
| 95 | - parent = module.parent; | |
| 96 | - | |
| 97 | - // Also modify the paths of the module that was used to load the app-module-paths module | |
| 98 | - // and all of it's parents | |
| 99 | - while(parent && parent !== require.main) { | |
| 100 | - removePathHelper(parent.paths); | |
| 101 | - parent = parent.parent; | |
| 102 | - } | |
| 103 | - } | |
| 104 | -} | |
| 105 | - | |
| 106 | -exports.addPath = addPath; | |
| 107 | -exports.removePath = removePath; | |
| 108 | -exports.enableForDir = enableForDir; |
node_modules/app-module-path/package.json
| ... | ... | @@ -1,63 +0,0 @@ |
| 1 | -{ | |
| 2 | - "_from": "app-module-path@^2.2.0", | |
| 3 | - "_id": "app-module-path@2.2.0", | |
| 4 | - "_inBundle": false, | |
| 5 | - "_integrity": "sha1-ZBqlXft9am8KgUHEucCqULbCTdU=", | |
| 6 | - "_location": "/app-module-path", | |
| 7 | - "_phantomChildren": {}, | |
| 8 | - "_requested": { | |
| 9 | - "type": "range", | |
| 10 | - "registry": true, | |
| 11 | - "raw": "app-module-path@^2.2.0", | |
| 12 | - "name": "app-module-path", | |
| 13 | - "escapedName": "app-module-path", | |
| 14 | - "rawSpec": "^2.2.0", | |
| 15 | - "saveSpec": null, | |
| 16 | - "fetchSpec": "^2.2.0" | |
| 17 | - }, | |
| 18 | - "_requiredBy": [ | |
| 19 | - "#USER", | |
| 20 | - "/" | |
| 21 | - ], | |
| 22 | - "_resolved": "https://registry.npmjs.org/app-module-path/-/app-module-path-2.2.0.tgz", | |
| 23 | - "_shasum": "641aa55dfb7d6a6f0a8141c4b9c0aa50b6c24dd5", | |
| 24 | - "_spec": "app-module-path@^2.2.0", | |
| 25 | - "_where": "C:\\Users\\admin\\Documents\\express-project", | |
| 26 | - "author": { | |
| 27 | - "name": "Patrick Steele-Idem", | |
| 28 | - "email": "pnidem@gmail.com" | |
| 29 | - }, | |
| 30 | - "bugs": { | |
| 31 | - "url": "https://github.com/patrick-steele-idem/app-module-path-node/issues" | |
| 32 | - }, | |
| 33 | - "bundleDependencies": false, | |
| 34 | - "deprecated": false, | |
| 35 | - "description": "Simple module to add additional directories to the Node module search for top-level app modules", | |
| 36 | - "devDependencies": { | |
| 37 | - "chai": "^3.5.0", | |
| 38 | - "mocha": "^3.2.0" | |
| 39 | - }, | |
| 40 | - "ebay": {}, | |
| 41 | - "homepage": "https://github.com/patrick-steele-idem/app-module-path-node", | |
| 42 | - "keywords": [ | |
| 43 | - "modules", | |
| 44 | - "path", | |
| 45 | - "node", | |
| 46 | - "extend", | |
| 47 | - "resolve" | |
| 48 | - ], | |
| 49 | - "license": "BSD-2-Clause", | |
| 50 | - "main": "lib/index.js", | |
| 51 | - "name": "app-module-path", | |
| 52 | - "publishConfig": { | |
| 53 | - "registry": "https://registry.npmjs.org/" | |
| 54 | - }, | |
| 55 | - "repository": { | |
| 56 | - "type": "git", | |
| 57 | - "url": "git+https://github.com/patrick-steele-idem/app-module-path-node.git" | |
| 58 | - }, | |
| 59 | - "scripts": { | |
| 60 | - "test": "node test/test.js && ./node_modules/mocha/bin/mocha test/test2.js" | |
| 61 | - }, | |
| 62 | - "version": "2.2.0" | |
| 63 | -} |
node_modules/app-module-path/register.js
| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | -var dirname = require('path').dirname; | |
| 2 | -var addPath = require('.').addPath; | |
| 3 | - | |
| 4 | -addPath(dirname(module.parent.filename), module.parent); | |
| 5 | - | |
| 6 | -// https://github.com/jhnns/rewire/blob/master/lib/index.js | |
| 7 | -delete require.cache[__filename]; // deleting self from module cache so the parent module is always up to date |
node_modules/app-module-path/test/.jshintrc
| ... | ... | @@ -1,43 +0,0 @@ |
| 1 | -{ | |
| 2 | - "predef": [ | |
| 3 | - "it", | |
| 4 | - "xit", | |
| 5 | - "console", | |
| 6 | - "describe", | |
| 7 | - "xdescribe", | |
| 8 | - "beforeEach", | |
| 9 | - "before", | |
| 10 | - "after", | |
| 11 | - "waits", | |
| 12 | - "waitsFor", | |
| 13 | - "runs" | |
| 14 | - ], | |
| 15 | - "node" : true, | |
| 16 | - "es5" : false, | |
| 17 | - "esnext": true, | |
| 18 | - "browser" : true, | |
| 19 | - "boss" : false, | |
| 20 | - "curly": false, | |
| 21 | - "debug": false, | |
| 22 | - "devel": false, | |
| 23 | - "eqeqeq": true, | |
| 24 | - "evil": true, | |
| 25 | - "forin": false, | |
| 26 | - "immed": true, | |
| 27 | - "laxbreak": false, | |
| 28 | - "newcap": true, | |
| 29 | - "noarg": true, | |
| 30 | - "noempty": false, | |
| 31 | - "nonew": true, | |
| 32 | - "nomen": false, | |
| 33 | - "onevar": false, | |
| 34 | - "plusplus": false, | |
| 35 | - "regexp": false, | |
| 36 | - "undef": true, | |
| 37 | - "sub": false, | |
| 38 | - "white": false, | |
| 39 | - "eqeqeq": false, | |
| 40 | - "latedef": true, | |
| 41 | - "unused": "vars", | |
| 42 | - "eqnull": true | |
| 43 | -} |
node_modules/app-module-path/test/node_modules/installed-module-allowed-explicit/index.js
node_modules/app-module-path/test/node_modules/installed-module-allowed-explicit/installed-module-allowed-explicit-foo/index.js
node_modules/app-module-path/test/node_modules/installed-module-allowed/index.js
node_modules/app-module-path/test/node_modules/installed-module-allowed/installed-module-allowed-foo/index.js
node_modules/app-module-path/test/node_modules/installed-module/index.js
| ... | ... | @@ -1,16 +0,0 @@ |
| 1 | -exports.sayHello = function() { | |
| 2 | - console.log('Hello from installed module'); | |
| 3 | - | |
| 4 | - var moduleA; | |
| 5 | - | |
| 6 | - try { | |
| 7 | - moduleA = require('module-a'); | |
| 8 | - } | |
| 9 | - catch(e) { | |
| 10 | - console.log('Not able to find module-a from ' + __filename + '... great!'); | |
| 11 | - } | |
| 12 | - | |
| 13 | - if (moduleA) { | |
| 14 | - throw new Error('module-a should not have been found from ' + __filename + '!'); | |
| 15 | - } | |
| 16 | -}; | |
| 17 | 0 | \ No newline at end of file |
node_modules/app-module-path/test/src/installed-module.js
node_modules/app-module-path/test/src/module-a/lib/index.js
node_modules/app-module-path/test/src/module-a/package.json
node_modules/app-module-path/test/src/module-b/index.js
node_modules/app-module-path/test/src/module-c/index.js
node_modules/app-module-path/test/src/module-d/index.js
node_modules/app-module-path/test/src/package.json
node_modules/app-module-path/test/test-helper-code.js
node_modules/app-module-path/test/test.js
| ... | ... | @@ -1,13 +0,0 @@ |
| 1 | -var path = require('path'); | |
| 2 | -var assert = require('assert'); | |
| 3 | -require('../').addPath(path.join(__dirname, 'src')); | |
| 4 | - | |
| 5 | -require('module-a').sayHello(); | |
| 6 | -require('module-b').sayHello(); | |
| 7 | -require('installed-module').sayHello(); | |
| 8 | - | |
| 9 | -assert(require('installed-module.js').isLocal); | |
| 10 | - | |
| 11 | -require('package.json'); | |
| 12 | - | |
| 13 | -console.log('All tests passed!'); | |
| 14 | 0 | \ No newline at end of file |
node_modules/app-module-path/test/test2.js
| ... | ... | @@ -1,37 +0,0 @@ |
| 1 | -var path = require('path'); | |
| 2 | -var assert = require('assert'); | |
| 3 | -var expect = require('chai').expect; | |
| 4 | - | |
| 5 | -require('./test-helper-code.js'); | |
| 6 | - | |
| 7 | -describe("support for test code", function() { | |
| 8 | - it("should load up a module in a path defined in test helper code", function() { | |
| 9 | - | |
| 10 | - require('module-a').sayHello(); | |
| 11 | - require('module-b').sayHello(); | |
| 12 | - }); | |
| 13 | - it("should not search paths that have been removed", function() { | |
| 14 | - require('module-c').sayHello(); | |
| 15 | - require('../').removePath(path.join(__dirname, 'src')); | |
| 16 | - assert.throws(function() { | |
| 17 | - require('module-d').sayHello(); | |
| 18 | - }); | |
| 19 | - }); | |
| 20 | - | |
| 21 | - it("should allow specific directory to be enabled", function() { | |
| 22 | - var targetDir = path.dirname(require.resolve('installed-module-allowed-explicit')); | |
| 23 | - require('../').addPath(targetDir); | |
| 24 | - require('../').enableForDir(targetDir); | |
| 25 | - | |
| 26 | - var foo = require('installed-module-allowed-explicit').getFoo(); | |
| 27 | - expect(foo.name).to.equal('installed-module-allowed-explicit-foo'); | |
| 28 | - }); | |
| 29 | - | |
| 30 | - it("should allow directories where loaded", function() { | |
| 31 | - require('../').addPath(path.join(__dirname, 'src')); | |
| 32 | - var foo = require('installed-module-allowed').getFoo(); | |
| 33 | - expect(foo.name).to.equal('installed-module-allowed-foo'); | |
| 34 | - }); | |
| 35 | -}); | |
| 36 | - | |
| 37 | -console.log('All tests passed!'); | |
| 38 | 0 | \ No newline at end of file |
node_modules/array-flatten/LICENSE
| ... | ... | @@ -1,21 +0,0 @@ |
| 1 | -The MIT License (MIT) | |
| 2 | - | |
| 3 | -Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) | |
| 4 | - | |
| 5 | -Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 6 | -of this software and associated documentation files (the "Software"), to deal | |
| 7 | -in the Software without restriction, including without limitation the rights | |
| 8 | -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| 9 | -copies of the Software, and to permit persons to whom the Software is | |
| 10 | -furnished to do so, subject to the following conditions: | |
| 11 | - | |
| 12 | -The above copyright notice and this permission notice shall be included in | |
| 13 | -all copies or substantial portions of the Software. | |
| 14 | - | |
| 15 | -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 16 | -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 17 | -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 18 | -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 19 | -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
| 20 | -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
| 21 | -THE SOFTWARE. |
node_modules/array-flatten/README.md
| ... | ... | @@ -1,43 +0,0 @@ |
| 1 | -# Array Flatten | |
| 2 | - | |
| 3 | -[![NPM version][npm-image]][npm-url] | |
| 4 | -[![NPM downloads][downloads-image]][downloads-url] | |
| 5 | -[![Build status][travis-image]][travis-url] | |
| 6 | -[![Test coverage][coveralls-image]][coveralls-url] | |
| 7 | - | |
| 8 | -> Flatten an array of nested arrays into a single flat array. Accepts an optional depth. | |
| 9 | - | |
| 10 | -## Installation | |
| 11 | - | |
| 12 | -``` | |
| 13 | -npm install array-flatten --save | |
| 14 | -``` | |
| 15 | - | |
| 16 | -## Usage | |
| 17 | - | |
| 18 | -```javascript | |
| 19 | -var flatten = require('array-flatten') | |
| 20 | - | |
| 21 | -flatten([1, [2, [3, [4, [5], 6], 7], 8], 9]) | |
| 22 | -//=> [1, 2, 3, 4, 5, 6, 7, 8, 9] | |
| 23 | - | |
| 24 | -flatten([1, [2, [3, [4, [5], 6], 7], 8], 9], 2) | |
| 25 | -//=> [1, 2, 3, [4, [5], 6], 7, 8, 9] | |
| 26 | - | |
| 27 | -(function () { | |
| 28 | - flatten(arguments) //=> [1, 2, 3] | |
| 29 | -})(1, [2, 3]) | |
| 30 | -``` | |
| 31 | - | |
| 32 | -## License | |
| 33 | - | |
| 34 | -MIT | |
| 35 | - | |
| 36 | -[npm-image]: https://img.shields.io/npm/v/array-flatten.svg?style=flat | |
| 37 | -[npm-url]: https://npmjs.org/package/array-flatten | |
| 38 | -[downloads-image]: https://img.shields.io/npm/dm/array-flatten.svg?style=flat | |
| 39 | -[downloads-url]: https://npmjs.org/package/array-flatten | |
| 40 | -[travis-image]: https://img.shields.io/travis/blakeembrey/array-flatten.svg?style=flat | |
| 41 | -[travis-url]: https://travis-ci.org/blakeembrey/array-flatten | |
| 42 | -[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/array-flatten.svg?style=flat | |
| 43 | -[coveralls-url]: https://coveralls.io/r/blakeembrey/array-flatten?branch=master |
node_modules/array-flatten/array-flatten.js
| ... | ... | @@ -1,64 +0,0 @@ |
| 1 | -'use strict' | |
| 2 | - | |
| 3 | -/** | |
| 4 | - * Expose `arrayFlatten`. | |
| 5 | - */ | |
| 6 | -module.exports = arrayFlatten | |
| 7 | - | |
| 8 | -/** | |
| 9 | - * Recursive flatten function with depth. | |
| 10 | - * | |
| 11 | - * @param {Array} array | |
| 12 | - * @param {Array} result | |
| 13 | - * @param {Number} depth | |
| 14 | - * @return {Array} | |
| 15 | - */ | |
| 16 | -function flattenWithDepth (array, result, depth) { | |
| 17 | - for (var i = 0; i < array.length; i++) { | |
| 18 | - var value = array[i] | |
| 19 | - | |
| 20 | - if (depth > 0 && Array.isArray(value)) { | |
| 21 | - flattenWithDepth(value, result, depth - 1) | |
| 22 | - } else { | |
| 23 | - result.push(value) | |
| 24 | - } | |
| 25 | - } | |
| 26 | - | |
| 27 | - return result | |
| 28 | -} | |
| 29 | - | |
| 30 | -/** | |
| 31 | - * Recursive flatten function. Omitting depth is slightly faster. | |
| 32 | - * | |
| 33 | - * @param {Array} array | |
| 34 | - * @param {Array} result | |
| 35 | - * @return {Array} | |
| 36 | - */ | |
| 37 | -function flattenForever (array, result) { | |
| 38 | - for (var i = 0; i < array.length; i++) { | |
| 39 | - var value = array[i] | |
| 40 | - | |
| 41 | - if (Array.isArray(value)) { | |
| 42 | - flattenForever(value, result) | |
| 43 | - } else { | |
| 44 | - result.push(value) | |
| 45 | - } | |
| 46 | - } | |
| 47 | - | |
| 48 | - return result | |
| 49 | -} | |
| 50 | - | |
| 51 | -/** | |
| 52 | - * Flatten an array, with the ability to define a depth. | |
| 53 | - * | |
| 54 | - * @param {Array} array | |
| 55 | - * @param {Number} depth | |
| 56 | - * @return {Array} | |
| 57 | - */ | |
| 58 | -function arrayFlatten (array, depth) { | |
| 59 | - if (depth == null) { | |
| 60 | - return flattenForever(array, []) | |
| 61 | - } | |
| 62 | - | |
| 63 | - return flattenWithDepth(array, [], depth) | |
| 64 | -} |
node_modules/array-flatten/package.json
| ... | ... | @@ -1,64 +0,0 @@ |
| 1 | -{ | |
| 2 | - "_from": "array-flatten@1.1.1", | |
| 3 | - "_id": "array-flatten@1.1.1", | |
| 4 | - "_inBundle": false, | |
| 5 | - "_integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", | |
| 6 | - "_location": "/array-flatten", | |
| 7 | - "_phantomChildren": {}, | |
| 8 | - "_requested": { | |
| 9 | - "type": "version", | |
| 10 | - "registry": true, | |
| 11 | - "raw": "array-flatten@1.1.1", | |
| 12 | - "name": "array-flatten", | |
| 13 | - "escapedName": "array-flatten", | |
| 14 | - "rawSpec": "1.1.1", | |
| 15 | - "saveSpec": null, | |
| 16 | - "fetchSpec": "1.1.1" | |
| 17 | - }, | |
| 18 | - "_requiredBy": [ | |
| 19 | - "/express" | |
| 20 | - ], | |
| 21 | - "_resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", | |
| 22 | - "_shasum": "9a5f699051b1e7073328f2a008968b64ea2955d2", | |
| 23 | - "_spec": "array-flatten@1.1.1", | |
| 24 | - "_where": "C:\\Users\\admin\\Documents\\express-project\\node_modules\\express", | |
| 25 | - "author": { | |
| 26 | - "name": "Blake Embrey", | |
| 27 | - "email": "hello@blakeembrey.com", | |
| 28 | - "url": "http://blakeembrey.me" | |
| 29 | - }, | |
| 30 | - "bugs": { | |
| 31 | - "url": "https://github.com/blakeembrey/array-flatten/issues" | |
| 32 | - }, | |
| 33 | - "bundleDependencies": false, | |
| 34 | - "deprecated": false, | |
| 35 | - "description": "Flatten an array of nested arrays into a single flat array", | |
| 36 | - "devDependencies": { | |
| 37 | - "istanbul": "^0.3.13", | |
| 38 | - "mocha": "^2.2.4", | |
| 39 | - "pre-commit": "^1.0.7", | |
| 40 | - "standard": "^3.7.3" | |
| 41 | - }, | |
| 42 | - "files": [ | |
| 43 | - "array-flatten.js", | |
| 44 | - "LICENSE" | |
| 45 | - ], | |
| 46 | - "homepage": "https://github.com/blakeembrey/array-flatten", | |
| 47 | - "keywords": [ | |
| 48 | - "array", | |
| 49 | - "flatten", | |
| 50 | - "arguments", | |
| 51 | - "depth" | |
| 52 | - ], | |
| 53 | - "license": "MIT", | |
| 54 | - "main": "array-flatten.js", | |
| 55 | - "name": "array-flatten", | |
| 56 | - "repository": { | |
| 57 | - "type": "git", | |
| 58 | - "url": "git://github.com/blakeembrey/array-flatten.git" | |
| 59 | - }, | |
| 60 | - "scripts": { | |
| 61 | - "test": "istanbul cover _mocha -- -R spec" | |
| 62 | - }, | |
| 63 | - "version": "1.1.1" | |
| 64 | -} |
node_modules/asn1/LICENSE
| ... | ... | @@ -1,19 +0,0 @@ |
| 1 | -Copyright (c) 2011 Mark Cavage, All rights reserved. | |
| 2 | - | |
| 3 | -Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 4 | -of this software and associated documentation files (the "Software"), to deal | |
| 5 | -in the Software without restriction, including without limitation the rights | |
| 6 | -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| 7 | -copies of the Software, and to permit persons to whom the Software is | |
| 8 | -furnished to do so, subject to the following conditions: | |
| 9 | - | |
| 10 | -The above copyright notice and this permission notice shall be included in | |
| 11 | -all copies or substantial portions of the Software. | |
| 12 | - | |
| 13 | -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 14 | -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 15 | -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 16 | -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 17 | -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
| 18 | -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
| 19 | -THE SOFTWARE |
node_modules/asn1/README.md
| ... | ... | @@ -1,50 +0,0 @@ |
| 1 | -node-asn1 is a library for encoding and decoding ASN.1 datatypes in pure JS. | |
| 2 | -Currently BER encoding is supported; at some point I'll likely have to do DER. | |
| 3 | - | |
| 4 | -## Usage | |
| 5 | - | |
| 6 | -Mostly, if you're *actually* needing to read and write ASN.1, you probably don't | |
| 7 | -need this readme to explain what and why. If you have no idea what ASN.1 is, | |
| 8 | -see this: ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc | |
| 9 | - | |
| 10 | -The source is pretty much self-explanatory, and has read/write methods for the | |
| 11 | -common types out there. | |
| 12 | - | |
| 13 | -### Decoding | |
| 14 | - | |
| 15 | -The following reads an ASN.1 sequence with a boolean. | |
| 16 | - | |
| 17 | - var Ber = require('asn1').Ber; | |
| 18 | - | |
| 19 | - var reader = new Ber.Reader(Buffer.from([0x30, 0x03, 0x01, 0x01, 0xff])); | |
| 20 | - | |
| 21 | - reader.readSequence(); | |
| 22 | - console.log('Sequence len: ' + reader.length); | |
| 23 | - if (reader.peek() === Ber.Boolean) | |
| 24 | - console.log(reader.readBoolean()); | |
| 25 | - | |
| 26 | -### Encoding | |
| 27 | - | |
| 28 | -The following generates the same payload as above. | |
| 29 | - | |
| 30 | - var Ber = require('asn1').Ber; | |
| 31 | - | |
| 32 | - var writer = new Ber.Writer(); | |
| 33 | - | |
| 34 | - writer.startSequence(); | |
| 35 | - writer.writeBoolean(true); | |
| 36 | - writer.endSequence(); | |
| 37 | - | |
| 38 | - console.log(writer.buffer); | |
| 39 | - | |
| 40 | -## Installation | |
| 41 | - | |
| 42 | - npm install asn1 | |
| 43 | - | |
| 44 | -## License | |
| 45 | - | |
| 46 | -MIT. | |
| 47 | - | |
| 48 | -## Bugs | |
| 49 | - | |
| 50 | -See <https://github.com/joyent/node-asn1/issues>. |
node_modules/asn1/lib/ber/errors.js
node_modules/asn1/lib/ber/index.js
| ... | ... | @@ -1,27 +0,0 @@ |
| 1 | -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. | |
| 2 | - | |
| 3 | -var errors = require('./errors'); | |
| 4 | -var types = require('./types'); | |
| 5 | - | |
| 6 | -var Reader = require('./reader'); | |
| 7 | -var Writer = require('./writer'); | |
| 8 | - | |
| 9 | - | |
| 10 | -// --- Exports | |
| 11 | - | |
| 12 | -module.exports = { | |
| 13 | - | |
| 14 | - Reader: Reader, | |
| 15 | - | |
| 16 | - Writer: Writer | |
| 17 | - | |
| 18 | -}; | |
| 19 | - | |
| 20 | -for (var t in types) { | |
| 21 | - if (types.hasOwnProperty(t)) | |
| 22 | - module.exports[t] = types[t]; | |
| 23 | -} | |
| 24 | -for (var e in errors) { | |
| 25 | - if (errors.hasOwnProperty(e)) | |
| 26 | - module.exports[e] = errors[e]; | |
| 27 | -} |
node_modules/asn1/lib/ber/reader.js
| ... | ... | @@ -1,262 +0,0 @@ |
| 1 | -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. | |
| 2 | - | |
| 3 | -var assert = require('assert'); | |
| 4 | -var Buffer = require('safer-buffer').Buffer; | |
| 5 | - | |
| 6 | -var ASN1 = require('./types'); | |
| 7 | -var errors = require('./errors'); | |
| 8 | - | |
| 9 | - | |
| 10 | -// --- Globals | |
| 11 | - | |
| 12 | -var newInvalidAsn1Error = errors.newInvalidAsn1Error; | |
| 13 | - | |
| 14 | - | |
| 15 | - | |
| 16 | -// --- API | |
| 17 | - | |
| 18 | -function Reader(data) { | |
| 19 | - if (!data || !Buffer.isBuffer(data)) | |
| 20 | - throw new TypeError('data must be a node Buffer'); | |
| 21 | - | |
| 22 | - this._buf = data; | |
| 23 | - this._size = data.length; | |
| 24 | - | |
| 25 | - // These hold the "current" state | |
| 26 | - this._len = 0; | |
| 27 | - this._offset = 0; | |
| 28 | -} | |
| 29 | - | |
| 30 | -Object.defineProperty(Reader.prototype, 'length', { | |
| 31 | - enumerable: true, | |
| 32 | - get: function () { return (this._len); } | |
| 33 | -}); | |
| 34 | - | |
| 35 | -Object.defineProperty(Reader.prototype, 'offset', { | |
| 36 | - enumerable: true, | |
| 37 | - get: function () { return (this._offset); } | |
| 38 | -}); | |
| 39 | - | |
| 40 | -Object.defineProperty(Reader.prototype, 'remain', { | |
| 41 | - get: function () { return (this._size - this._offset); } | |
| 42 | -}); | |
| 43 | - | |
| 44 | -Object.defineProperty(Reader.prototype, 'buffer', { | |
| 45 | - get: function () { return (this._buf.slice(this._offset)); } | |
| 46 | -}); | |
| 47 | - | |
| 48 | - | |
| 49 | -/** | |
| 50 | - * Reads a single byte and advances offset; you can pass in `true` to make this | |
| 51 | - * a "peek" operation (i.e., get the byte, but don't advance the offset). | |
| 52 | - * | |
| 53 | - * @param {Boolean} peek true means don't move offset. | |
| 54 | - * @return {Number} the next byte, null if not enough data. | |
| 55 | - */ | |
| 56 | -Reader.prototype.readByte = function (peek) { | |
| 57 | - if (this._size - this._offset < 1) | |
| 58 | - return null; | |
| 59 | - | |
| 60 | - var b = this._buf[this._offset] & 0xff; | |
| 61 | - | |
| 62 | - if (!peek) | |
| 63 | - this._offset += 1; | |
| 64 | - | |
| 65 | - return b; | |
| 66 | -}; | |
| 67 | - | |
| 68 | - | |
| 69 | -Reader.prototype.peek = function () { | |
| 70 | - return this.readByte(true); | |
| 71 | -}; | |
| 72 | - | |
| 73 | - | |
| 74 | -/** | |
| 75 | - * Reads a (potentially) variable length off the BER buffer. This call is | |
| 76 | - * not really meant to be called directly, as callers have to manipulate | |
| 77 | - * the internal buffer afterwards. | |
| 78 | - * | |
| 79 | - * As a result of this call, you can call `Reader.length`, until the | |
| 80 | - * next thing called that does a readLength. | |
| 81 | - * | |
| 82 | - * @return {Number} the amount of offset to advance the buffer. | |
| 83 | - * @throws {InvalidAsn1Error} on bad ASN.1 | |
| 84 | - */ | |
| 85 | -Reader.prototype.readLength = function (offset) { | |
| 86 | - if (offset === undefined) | |
| 87 | - offset = this._offset; | |
| 88 | - | |
| 89 | - if (offset >= this._size) | |
| 90 | - return null; | |
| 91 | - | |
| 92 | - var lenB = this._buf[offset++] & 0xff; | |
| 93 | - if (lenB === null) | |
| 94 | - return null; | |
| 95 | - | |
| 96 | - if ((lenB & 0x80) === 0x80) { | |
| 97 | - lenB &= 0x7f; | |
| 98 | - | |
| 99 | - if (lenB === 0) | |
| 100 | - throw newInvalidAsn1Error('Indefinite length not supported'); | |
| 101 | - | |
| 102 | - if (lenB > 4) | |
| 103 | - throw newInvalidAsn1Error('encoding too long'); | |
| 104 | - | |
| 105 | - if (this._size - offset < lenB) | |
| 106 | - return null; | |
| 107 | - | |
| 108 | - this._len = 0; | |
| 109 | - for (var i = 0; i < lenB; i++) | |
| 110 | - this._len = (this._len << 8) + (this._buf[offset++] & 0xff); | |
| 111 | - | |
| 112 | - } else { | |
| 113 | - // Wasn't a variable length | |
| 114 | - this._len = lenB; | |
| 115 | - } | |
| 116 | - | |
| 117 | - return offset; | |
| 118 | -}; | |
| 119 | - | |
| 120 | - | |
| 121 | -/** | |
| 122 | - * Parses the next sequence in this BER buffer. | |
| 123 | - * | |
| 124 | - * To get the length of the sequence, call `Reader.length`. | |
| 125 | - * | |
| 126 | - * @return {Number} the sequence's tag. | |
| 127 | - */ | |
| 128 | -Reader.prototype.readSequence = function (tag) { | |
| 129 | - var seq = this.peek(); | |
| 130 | - if (seq === null) | |
| 131 | - return null; | |
| 132 | - if (tag !== undefined && tag !== seq) | |
| 133 | - throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + | |
| 134 | - ': got 0x' + seq.toString(16)); | |
| 135 | - | |
| 136 | - var o = this.readLength(this._offset + 1); // stored in `length` | |
| 137 | - if (o === null) | |
| 138 | - return null; | |
| 139 | - | |
| 140 | - this._offset = o; | |
| 141 | - return seq; | |
| 142 | -}; | |
| 143 | - | |
| 144 | - | |
| 145 | -Reader.prototype.readInt = function () { | |
| 146 | - return this._readTag(ASN1.Integer); | |
| 147 | -}; | |
| 148 | - | |
| 149 | - | |
| 150 | -Reader.prototype.readBoolean = function () { | |
| 151 | - return (this._readTag(ASN1.Boolean) === 0 ? false : true); | |
| 152 | -}; | |
| 153 | - | |
| 154 | - | |
| 155 | -Reader.prototype.readEnumeration = function () { | |
| 156 | - return this._readTag(ASN1.Enumeration); | |
| 157 | -}; | |
| 158 | - | |
| 159 | - | |
| 160 | -Reader.prototype.readString = function (tag, retbuf) { | |
| 161 | - if (!tag) | |
| 162 | - tag = ASN1.OctetString; | |
| 163 | - | |
| 164 | - var b = this.peek(); | |
| 165 | - if (b === null) | |
| 166 | - return null; | |
| 167 | - | |
| 168 | - if (b !== tag) | |
| 169 | - throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + | |
| 170 | - ': got 0x' + b.toString(16)); | |
| 171 | - | |
| 172 | - var o = this.readLength(this._offset + 1); // stored in `length` | |
| 173 | - | |
| 174 | - if (o === null) | |
| 175 | - return null; | |
| 176 | - | |
| 177 | - if (this.length > this._size - o) | |
| 178 | - return null; | |
| 179 | - | |
| 180 | - this._offset = o; | |
| 181 | - | |
| 182 | - if (this.length === 0) | |
| 183 | - return retbuf ? Buffer.alloc(0) : ''; | |
| 184 | - | |
| 185 | - var str = this._buf.slice(this._offset, this._offset + this.length); | |
| 186 | - this._offset += this.length; | |
| 187 | - | |
| 188 | - return retbuf ? str : str.toString('utf8'); | |
| 189 | -}; | |
| 190 | - | |
| 191 | -Reader.prototype.readOID = function (tag) { | |
| 192 | - if (!tag) | |
| 193 | - tag = ASN1.OID; | |
| 194 | - | |
| 195 | - var b = this.readString(tag, true); | |
| 196 | - if (b === null) | |
| 197 | - return null; | |
| 198 | - | |
| 199 | - var values = []; | |
| 200 | - var value = 0; | |
| 201 | - | |
| 202 | - for (var i = 0; i < b.length; i++) { | |
| 203 | - var byte = b[i] & 0xff; | |
| 204 | - | |
| 205 | - value <<= 7; | |
| 206 | - value += byte & 0x7f; | |
| 207 | - if ((byte & 0x80) === 0) { | |
| 208 | - values.push(value); | |
| 209 | - value = 0; | |
| 210 | - } | |
| 211 | - } | |
| 212 | - | |
| 213 | - value = values.shift(); | |
| 214 | - values.unshift(value % 40); | |
| 215 | - values.unshift((value / 40) >> 0); | |
| 216 | - | |
| 217 | - return values.join('.'); | |
| 218 | -}; | |
| 219 | - | |
| 220 | - | |
| 221 | -Reader.prototype._readTag = function (tag) { | |
| 222 | - assert.ok(tag !== undefined); | |
| 223 | - | |
| 224 | - var b = this.peek(); | |
| 225 | - | |
| 226 | - if (b === null) | |
| 227 | - return null; | |
| 228 | - | |
| 229 | - if (b !== tag) | |
| 230 | - throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + | |
| 231 | - ': got 0x' + b.toString(16)); | |
| 232 | - | |
| 233 | - var o = this.readLength(this._offset + 1); // stored in `length` | |
| 234 | - if (o === null) | |
| 235 | - return null; | |
| 236 | - | |
| 237 | - if (this.length > 4) | |
| 238 | - throw newInvalidAsn1Error('Integer too long: ' + this.length); | |
| 239 | - | |
| 240 | - if (this.length > this._size - o) | |
| 241 | - return null; | |
| 242 | - this._offset = o; | |
| 243 | - | |
| 244 | - var fb = this._buf[this._offset]; | |
| 245 | - var value = 0; | |
| 246 | - | |
| 247 | - for (var i = 0; i < this.length; i++) { | |
| 248 | - value <<= 8; | |
| 249 | - value |= (this._buf[this._offset++] & 0xff); | |
| 250 | - } | |
| 251 | - | |
| 252 | - if ((fb & 0x80) === 0x80 && i !== 4) | |
| 253 | - value -= (1 << (i * 8)); | |
| 254 | - | |
| 255 | - return value >> 0; | |
| 256 | -}; | |
| 257 | - | |
| 258 | - | |
| 259 | - | |
| 260 | -// --- Exported API | |
| 261 | - | |
| 262 | -module.exports = Reader; |
node_modules/asn1/lib/ber/types.js
| ... | ... | @@ -1,36 +0,0 @@ |
| 1 | -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. | |
| 2 | - | |
| 3 | - | |
| 4 | -module.exports = { | |
| 5 | - EOC: 0, | |
| 6 | - Boolean: 1, | |
| 7 | - Integer: 2, | |
| 8 | - BitString: 3, | |
| 9 | - OctetString: 4, | |
| 10 | - Null: 5, | |
| 11 | - OID: 6, | |
| 12 | - ObjectDescriptor: 7, | |
| 13 | - External: 8, | |
| 14 | - Real: 9, // float | |
| 15 | - Enumeration: 10, | |
| 16 | - PDV: 11, | |
| 17 | - Utf8String: 12, | |
| 18 | - RelativeOID: 13, | |
| 19 | - Sequence: 16, | |
| 20 | - Set: 17, | |
| 21 | - NumericString: 18, | |
| 22 | - PrintableString: 19, | |
| 23 | - T61String: 20, | |
| 24 | - VideotexString: 21, | |
| 25 | - IA5String: 22, | |
| 26 | - UTCTime: 23, | |
| 27 | - GeneralizedTime: 24, | |
| 28 | - GraphicString: 25, | |
| 29 | - VisibleString: 26, | |
| 30 | - GeneralString: 28, | |
| 31 | - UniversalString: 29, | |
| 32 | - CharacterString: 30, | |
| 33 | - BMPString: 31, | |
| 34 | - Constructor: 32, | |
| 35 | - Context: 128 | |
| 36 | -}; |
node_modules/asn1/lib/ber/writer.js
| ... | ... | @@ -1,317 +0,0 @@ |
| 1 | -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. | |
| 2 | - | |
| 3 | -var assert = require('assert'); | |
| 4 | -var Buffer = require('safer-buffer').Buffer; | |
| 5 | -var ASN1 = require('./types'); | |
| 6 | -var errors = require('./errors'); | |
| 7 | - | |
| 8 | - | |
| 9 | -// --- Globals | |
| 10 | - | |
| 11 | -var newInvalidAsn1Error = errors.newInvalidAsn1Error; | |
| 12 | - | |
| 13 | -var DEFAULT_OPTS = { | |
| 14 | - size: 1024, | |
| 15 | - growthFactor: 8 | |
| 16 | -}; | |
| 17 | - | |
| 18 | - | |
| 19 | -// --- Helpers | |
| 20 | - | |
| 21 | -function merge(from, to) { | |
| 22 | - assert.ok(from); | |
| 23 | - assert.equal(typeof (from), 'object'); | |
| 24 | - assert.ok(to); | |
| 25 | - assert.equal(typeof (to), 'object'); | |
| 26 | - | |
| 27 | - var keys = Object.getOwnPropertyNames(from); | |
| 28 | - keys.forEach(function (key) { | |
| 29 | - if (to[key]) | |
| 30 | - return; | |
| 31 | - | |
| 32 | - var value = Object.getOwnPropertyDescriptor(from, key); | |
| 33 | - Object.defineProperty(to, key, value); | |
| 34 | - }); | |
| 35 | - | |
| 36 | - return to; | |
| 37 | -} | |
| 38 | - | |
| 39 | - | |
| 40 | - | |
| 41 | -// --- API | |
| 42 | - | |
| 43 | -function Writer(options) { | |
| 44 | - options = merge(DEFAULT_OPTS, options || {}); | |
| 45 | - | |
| 46 | - this._buf = Buffer.alloc(options.size || 1024); | |
| 47 | - this._size = this._buf.length; | |
| 48 | - this._offset = 0; | |
| 49 | - this._options = options; | |
| 50 | - | |
| 51 | - // A list of offsets in the buffer where we need to insert | |
| 52 | - // sequence tag/len pairs. | |
| 53 | - this._seq = []; | |
| 54 | -} | |
| 55 | - | |
| 56 | -Object.defineProperty(Writer.prototype, 'buffer', { | |
| 57 | - get: function () { | |
| 58 | - if (this._seq.length) | |
| 59 | - throw newInvalidAsn1Error(this._seq.length + ' unended sequence(s)'); | |
| 60 | - | |
| 61 | - return (this._buf.slice(0, this._offset)); | |
| 62 | - } | |
| 63 | -}); | |
| 64 | - | |
| 65 | -Writer.prototype.writeByte = function (b) { | |
| 66 | - if (typeof (b) !== 'number') | |
| 67 | - throw new TypeError('argument must be a Number'); | |
| 68 | - | |
| 69 | - this._ensure(1); | |
| 70 | - this._buf[this._offset++] = b; | |
| 71 | -}; | |
| 72 | - | |
| 73 | - | |
| 74 | -Writer.prototype.writeInt = function (i, tag) { | |
| 75 | - if (typeof (i) !== 'number') | |
| 76 | - throw new TypeError('argument must be a Number'); | |
| 77 | - if (typeof (tag) !== 'number') | |
| 78 | - tag = ASN1.Integer; | |
| 79 | - | |
| 80 | - var sz = 4; | |
| 81 | - | |
| 82 | - while ((((i & 0xff800000) === 0) || ((i & 0xff800000) === 0xff800000 >> 0)) && | |
| 83 | - (sz > 1)) { | |
| 84 | - sz--; | |
| 85 | - i <<= 8; | |
| 86 | - } | |
| 87 | - | |
| 88 | - if (sz > 4) | |
| 89 | - throw newInvalidAsn1Error('BER ints cannot be > 0xffffffff'); | |
| 90 | - | |
| 91 | - this._ensure(2 + sz); | |
| 92 | - this._buf[this._offset++] = tag; | |
| 93 | - this._buf[this._offset++] = sz; | |
| 94 | - | |
| 95 | - while (sz-- > 0) { | |
| 96 | - this._buf[this._offset++] = ((i & 0xff000000) >>> 24); | |
| 97 | - i <<= 8; | |
| 98 | - } | |
| 99 | - | |
| 100 | -}; | |
| 101 | - | |
| 102 | - | |
| 103 | -Writer.prototype.writeNull = function () { | |
| 104 | - this.writeByte(ASN1.Null); | |
| 105 | - this.writeByte(0x00); | |
| 106 | -}; | |
| 107 | - | |
| 108 | - | |
| 109 | -Writer.prototype.writeEnumeration = function (i, tag) { | |
| 110 | - if (typeof (i) !== 'number') | |
| 111 | - throw new TypeError('argument must be a Number'); | |
| 112 | - if (typeof (tag) !== 'number') | |
| 113 | - tag = ASN1.Enumeration; | |
| 114 | - | |
| 115 | - return this.writeInt(i, tag); | |
| 116 | -}; | |
| 117 | - | |
| 118 | - | |
| 119 | -Writer.prototype.writeBoolean = function (b, tag) { | |
| 120 | - if (typeof (b) !== 'boolean') | |
| 121 | - throw new TypeError('argument must be a Boolean'); | |
| 122 | - if (typeof (tag) !== 'number') | |
| 123 | - tag = ASN1.Boolean; | |
| 124 | - | |
| 125 | - this._ensure(3); | |
| 126 | - this._buf[this._offset++] = tag; | |
| 127 | - this._buf[this._offset++] = 0x01; | |
| 128 | - this._buf[this._offset++] = b ? 0xff : 0x00; | |
| 129 | -}; | |
| 130 | - | |
| 131 | - | |
| 132 | -Writer.prototype.writeString = function (s, tag) { | |
| 133 | - if (typeof (s) !== 'string') | |
| 134 | - throw new TypeError('argument must be a string (was: ' + typeof (s) + ')'); | |
| 135 | - if (typeof (tag) !== 'number') | |
| 136 | - tag = ASN1.OctetString; | |
| 137 | - | |
| 138 | - var len = Buffer.byteLength(s); | |
| 139 | - this.writeByte(tag); | |
| 140 | - this.writeLength(len); | |
| 141 | - if (len) { | |
| 142 | - this._ensure(len); | |
| 143 | - this._buf.write(s, this._offset); | |
| 144 | - this._offset += len; | |
| 145 | - } | |
| 146 | -}; | |
| 147 | - | |
| 148 | - | |
| 149 | -Writer.prototype.writeBuffer = function (buf, tag) { | |
| 150 | - if (typeof (tag) !== 'number') | |
| 151 | - throw new TypeError('tag must be a number'); | |
| 152 | - if (!Buffer.isBuffer(buf)) | |
| 153 | - throw new TypeError('argument must be a buffer'); | |
| 154 | - | |
| 155 | - this.writeByte(tag); | |
| 156 | - this.writeLength(buf.length); | |
| 157 | - this._ensure(buf.length); | |
| 158 | - buf.copy(this._buf, this._offset, 0, buf.length); | |
| 159 | - this._offset += buf.length; | |
| 160 | -}; | |
| 161 | - | |
| 162 | - | |
| 163 | -Writer.prototype.writeStringArray = function (strings) { | |
| 164 | - if ((!strings instanceof Array)) | |
| 165 | - throw new TypeError('argument must be an Array[String]'); | |
| 166 | - | |
| 167 | - var self = this; | |
| 168 | - strings.forEach(function (s) { | |
| 169 | - self.writeString(s); | |
| 170 | - }); | |
| 171 | -}; | |
| 172 | - | |
| 173 | -// This is really to solve DER cases, but whatever for now | |
| 174 | -Writer.prototype.writeOID = function (s, tag) { | |
| 175 | - if (typeof (s) !== 'string') | |
| 176 | - throw new TypeError('argument must be a string'); | |
| 177 | - if (typeof (tag) !== 'number') | |
| 178 | - tag = ASN1.OID; | |
| 179 | - | |
| 180 | - if (!/^([0-9]+\.){3,}[0-9]+$/.test(s)) | |
| 181 | - throw new Error('argument is not a valid OID string'); | |
| 182 | - | |
| 183 | - function encodeOctet(bytes, octet) { | |
| 184 | - if (octet < 128) { | |
| 185 | - bytes.push(octet); | |
| 186 | - } else if (octet < 16384) { | |
| 187 | - bytes.push((octet >>> 7) | 0x80); | |
| 188 | - bytes.push(octet & 0x7F); | |
| 189 | - } else if (octet < 2097152) { | |
| 190 | - bytes.push((octet >>> 14) | 0x80); | |
| 191 | - bytes.push(((octet >>> 7) | 0x80) & 0xFF); | |
| 192 | - bytes.push(octet & 0x7F); | |
| 193 | - } else if (octet < 268435456) { | |
| 194 | - bytes.push((octet >>> 21) | 0x80); | |
| 195 | - bytes.push(((octet >>> 14) | 0x80) & 0xFF); | |
| 196 | - bytes.push(((octet >>> 7) | 0x80) & 0xFF); | |
| 197 | - bytes.push(octet & 0x7F); | |
| 198 | - } else { | |
| 199 | - bytes.push(((octet >>> 28) | 0x80) & 0xFF); | |
| 200 | - bytes.push(((octet >>> 21) | 0x80) & 0xFF); | |
| 201 | - bytes.push(((octet >>> 14) | 0x80) & 0xFF); | |
| 202 | - bytes.push(((octet >>> 7) | 0x80) & 0xFF); | |
| 203 | - bytes.push(octet & 0x7F); | |
| 204 | - } | |
| 205 | - } | |
| 206 | - | |
| 207 | - var tmp = s.split('.'); | |
| 208 | - var bytes = []; | |
| 209 | - bytes.push(parseInt(tmp[0], 10) * 40 + parseInt(tmp[1], 10)); | |
| 210 | - tmp.slice(2).forEach(function (b) { | |
| 211 | - encodeOctet(bytes, parseInt(b, 10)); | |
| 212 | - }); | |
| 213 | - | |
| 214 | - var self = this; | |
| 215 | - this._ensure(2 + bytes.length); | |
| 216 | - this.writeByte(tag); | |
| 217 | - this.writeLength(bytes.length); | |
| 218 | - bytes.forEach(function (b) { | |
| 219 | - self.writeByte(b); | |
| 220 | - }); | |
| 221 | -}; | |
| 222 | - | |
| 223 | - | |
| 224 | -Writer.prototype.writeLength = function (len) { | |
| 225 | - if (typeof (len) !== 'number') | |
| 226 | - throw new TypeError('argument must be a Number'); | |
| 227 | - | |
| 228 | - this._ensure(4); | |
| 229 | - | |
| 230 | - if (len <= 0x7f) { | |
| 231 | - this._buf[this._offset++] = len; | |
| 232 | - } else if (len <= 0xff) { | |
| 233 | - this._buf[this._offset++] = 0x81; | |
| 234 | - this._buf[this._offset++] = len; | |
| 235 | - } else if (len <= 0xffff) { | |
| 236 | - this._buf[this._offset++] = 0x82; | |
| 237 | - this._buf[this._offset++] = len >> 8; | |
| 238 | - this._buf[this._offset++] = len; | |
| 239 | - } else if (len <= 0xffffff) { | |
| 240 | - this._buf[this._offset++] = 0x83; | |
| 241 | - this._buf[this._offset++] = len >> 16; | |
| 242 | - this._buf[this._offset++] = len >> 8; | |
| 243 | - this._buf[this._offset++] = len; | |
| 244 | - } else { | |
| 245 | - throw newInvalidAsn1Error('Length too long (> 4 bytes)'); | |
| 246 | - } | |
| 247 | -}; | |
| 248 | - | |
| 249 | -Writer.prototype.startSequence = function (tag) { | |
| 250 | - if (typeof (tag) !== 'number') | |
| 251 | - tag = ASN1.Sequence | ASN1.Constructor; | |
| 252 | - | |
| 253 | - this.writeByte(tag); | |
| 254 | - this._seq.push(this._offset); | |
| 255 | - this._ensure(3); | |
| 256 | - this._offset += 3; | |
| 257 | -}; | |
| 258 | - | |
| 259 | - | |
| 260 | -Writer.prototype.endSequence = function () { | |
| 261 | - var seq = this._seq.pop(); | |
| 262 | - var start = seq + 3; | |
| 263 | - var len = this._offset - start; | |
| 264 | - | |
| 265 | - if (len <= 0x7f) { | |
| 266 | - this._shift(start, len, -2); | |
| 267 | - this._buf[seq] = len; | |
| 268 | - } else if (len <= 0xff) { | |
| 269 | - this._shift(start, len, -1); | |
| 270 | - this._buf[seq] = 0x81; | |
| 271 | - this._buf[seq + 1] = len; | |
| 272 | - } else if (len <= 0xffff) { | |
| 273 | - this._buf[seq] = 0x82; | |
| 274 | - this._buf[seq + 1] = len >> 8; | |
| 275 | - this._buf[seq + 2] = len; | |
| 276 | - } else if (len <= 0xffffff) { | |
| 277 | - this._shift(start, len, 1); | |
| 278 | - this._buf[seq] = 0x83; | |
| 279 | - this._buf[seq + 1] = len >> 16; | |
| 280 | - this._buf[seq + 2] = len >> 8; | |
| 281 | - this._buf[seq + 3] = len; | |
| 282 | - } else { | |
| 283 | - throw newInvalidAsn1Error('Sequence too long'); | |
| 284 | - } | |
| 285 | -}; | |
| 286 | - | |
| 287 | - | |
| 288 | -Writer.prototype._shift = function (start, len, shift) { | |
| 289 | - assert.ok(start !== undefined); | |
| 290 | - assert.ok(len !== undefined); | |
| 291 | - assert.ok(shift); | |
| 292 | - | |
| 293 | - this._buf.copy(this._buf, start + shift, start, start + len); | |
| 294 | - this._offset += shift; | |
| 295 | -}; | |
| 296 | - | |
| 297 | -Writer.prototype._ensure = function (len) { | |
| 298 | - assert.ok(len); | |
| 299 | - | |
| 300 | - if (this._size - this._offset < len) { | |
| 301 | - var sz = this._size * this._options.growthFactor; | |
| 302 | - if (sz - this._offset < len) | |
| 303 | - sz += len; | |
| 304 | - | |
| 305 | - var buf = Buffer.alloc(sz); | |
| 306 | - | |
| 307 | - this._buf.copy(buf, 0, 0, this._offset); | |
| 308 | - this._buf = buf; | |
| 309 | - this._size = sz; | |
| 310 | - } | |
| 311 | -}; | |
| 312 | - | |
| 313 | - | |
| 314 | - | |
| 315 | -// --- Exported API | |
| 316 | - | |
| 317 | -module.exports = Writer; |
node_modules/asn1/lib/index.js
| ... | ... | @@ -1,20 +0,0 @@ |
| 1 | -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. | |
| 2 | - | |
| 3 | -// If you have no idea what ASN.1 or BER is, see this: | |
| 4 | -// ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc | |
| 5 | - | |
| 6 | -var Ber = require('./ber/index'); | |
| 7 | - | |
| 8 | - | |
| 9 | - | |
| 10 | -// --- Exported API | |
| 11 | - | |
| 12 | -module.exports = { | |
| 13 | - | |
| 14 | - Ber: Ber, | |
| 15 | - | |
| 16 | - BerReader: Ber.Reader, | |
| 17 | - | |
| 18 | - BerWriter: Ber.Writer | |
| 19 | - | |
| 20 | -}; |
node_modules/asn1/package.json
| ... | ... | @@ -1,75 +0,0 @@ |
| 1 | -{ | |
| 2 | - "_from": "asn1@~0.2.3", | |
| 3 | - "_id": "asn1@0.2.4", | |
| 4 | - "_inBundle": false, | |
| 5 | - "_integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", | |
| 6 | - "_location": "/asn1", | |
| 7 | - "_phantomChildren": {}, | |
| 8 | - "_requested": { | |
| 9 | - "type": "range", | |
| 10 | - "registry": true, | |
| 11 | - "raw": "asn1@~0.2.3", | |
| 12 | - "name": "asn1", | |
| 13 | - "escapedName": "asn1", | |
| 14 | - "rawSpec": "~0.2.3", | |
| 15 | - "saveSpec": null, | |
| 16 | - "fetchSpec": "~0.2.3" | |
| 17 | - }, | |
| 18 | - "_requiredBy": [ | |
| 19 | - "/sshpk" | |
| 20 | - ], | |
| 21 | - "_resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", | |
| 22 | - "_shasum": "8d2475dfab553bb33e77b54e59e880bb8ce23136", | |
| 23 | - "_spec": "asn1@~0.2.3", | |
| 24 | - "_where": "C:\\Users\\admin\\Documents\\express-project\\node_modules\\sshpk", | |
| 25 | - "author": { | |
| 26 | - "name": "Joyent", | |
| 27 | - "url": "joyent.com" | |
| 28 | - }, | |
| 29 | - "bugs": { | |
| 30 | - "url": "https://github.com/joyent/node-asn1/issues" | |
| 31 | - }, | |
| 32 | - "bundleDependencies": false, | |
| 33 | - "contributors": [ | |
| 34 | - { | |
| 35 | - "name": "Mark Cavage", | |
| 36 | - "email": "mcavage@gmail.com" | |
| 37 | - }, | |
| 38 | - { | |
| 39 | - "name": "David Gwynne", | |
| 40 | - "email": "loki@animata.net" | |
| 41 | - }, | |
| 42 | - { | |
| 43 | - "name": "Yunong Xiao", | |
| 44 | - "email": "yunong@joyent.com" | |
| 45 | - }, | |
| 46 | - { | |
| 47 | - "name": "Alex Wilson", | |
| 48 | - "email": "alex.wilson@joyent.com" | |
| 49 | - } | |
| 50 | - ], | |
| 51 | - "dependencies": { | |
| 52 | - "safer-buffer": "~2.1.0" | |
| 53 | - }, | |
| 54 | - "deprecated": false, | |
| 55 | - "description": "Contains parsers and serializers for ASN.1 (currently BER only)", | |
| 56 | - "devDependencies": { | |
| 57 | - "eslint": "2.13.1", | |
| 58 | - "eslint-plugin-joyent": "~1.3.0", | |
| 59 | - "faucet": "0.0.1", | |
| 60 | - "istanbul": "^0.3.6", | |
| 61 | - "tape": "^3.5.0" | |
| 62 | - }, | |
| 63 | - "homepage": "https://github.com/joyent/node-asn1#readme", | |
| 64 | - "license": "MIT", | |
| 65 | - "main": "lib/index.js", | |
| 66 | - "name": "asn1", | |
| 67 | - "repository": { | |
| 68 | - "type": "git", | |
| 69 | - "url": "git://github.com/joyent/node-asn1.git" | |
| 70 | - }, | |
| 71 | - "scripts": { | |
| 72 | - "test": "tape ./test/ber/*.test.js" | |
| 73 | - }, | |
| 74 | - "version": "0.2.4" | |
| 75 | -} |
node_modules/assert-plus/AUTHORS
node_modules/assert-plus/CHANGES.md
node_modules/assert-plus/README.md
| ... | ... | @@ -1,155 +0,0 @@ |
| 1 | -# assert-plus | |
| 2 | - | |
| 3 | -This library is a super small wrapper over node's assert module that has two | |
| 4 | -things: (1) the ability to disable assertions with the environment variable | |
| 5 | -NODE\_NDEBUG, and (2) some API wrappers for argument testing. Like | |
| 6 | -`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks | |
| 7 | -like this: | |
| 8 | - | |
| 9 | -```javascript | |
| 10 | - var assert = require('assert-plus'); | |
| 11 | - | |
| 12 | - function fooAccount(options, callback) { | |
| 13 | - assert.object(options, 'options'); | |
| 14 | - assert.number(options.id, 'options.id'); | |
| 15 | - assert.bool(options.isManager, 'options.isManager'); | |
| 16 | - assert.string(options.name, 'options.name'); | |
| 17 | - assert.arrayOfString(options.email, 'options.email'); | |
| 18 | - assert.func(callback, 'callback'); | |
| 19 | - | |
| 20 | - // Do stuff | |
| 21 | - callback(null, {}); | |
| 22 | - } | |
| 23 | -``` | |
| 24 | - | |
| 25 | -# API | |
| 26 | - | |
| 27 | -All methods that *aren't* part of node's core assert API are simply assumed to | |
| 28 | -take an argument, and then a string 'name' that's not a message; `AssertionError` | |
| 29 | -will be thrown if the assertion fails with a message like: | |
| 30 | - | |
| 31 | - AssertionError: foo (string) is required | |
| 32 | - at test (/home/mark/work/foo/foo.js:3:9) | |
| 33 | - at Object.<anonymous> (/home/mark/work/foo/foo.js:15:1) | |
| 34 | - at Module._compile (module.js:446:26) | |
| 35 | - at Object..js (module.js:464:10) | |
| 36 | - at Module.load (module.js:353:31) | |
| 37 | - at Function._load (module.js:311:12) | |
| 38 | - at Array.0 (module.js:484:10) | |
| 39 | - at EventEmitter._tickCallback (node.js:190:38) | |
| 40 | - | |
| 41 | -from: | |
| 42 | - | |
| 43 | -```javascript | |
| 44 | - function test(foo) { | |
| 45 | - assert.string(foo, 'foo'); | |
| 46 | - } | |
| 47 | -``` | |
| 48 | - | |
| 49 | -There you go. You can check that arrays are of a homogeneous type with `Arrayof$Type`: | |
| 50 | - | |
| 51 | -```javascript | |
| 52 | - function test(foo) { | |
| 53 | - assert.arrayOfString(foo, 'foo'); | |
| 54 | - } | |
| 55 | -``` | |
| 56 | - | |
| 57 | -You can assert IFF an argument is not `undefined` (i.e., an optional arg): | |
| 58 | - | |
| 59 | -```javascript | |
| 60 | - assert.optionalString(foo, 'foo'); | |
| 61 | -``` | |
| 62 | - | |
| 63 | -Lastly, you can opt-out of assertion checking altogether by setting the | |
| 64 | -environment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have | |
| 65 | -lots of assertions, and don't want to pay `typeof ()` taxes to v8 in | |
| 66 | -production. Be advised: The standard functions re-exported from `assert` are | |
| 67 | -also disabled in assert-plus if NDEBUG is specified. Using them directly from | |
| 68 | -the `assert` module avoids this behavior. | |
| 69 | - | |
| 70 | -The complete list of APIs is: | |
| 71 | - | |
| 72 | -* assert.array | |
| 73 | -* assert.bool | |
| 74 | -* assert.buffer | |
| 75 | -* assert.func | |
| 76 | -* assert.number | |
| 77 | -* assert.object | |
| 78 | -* assert.string | |
| 79 | -* assert.stream | |
| 80 | -* assert.date | |
| 81 | -* assert.regex | |
| 82 | -* assert.uuid | |
| 83 | -* assert.arrayOfArray | |
| 84 | -* assert.arrayOfBool | |
| 85 | -* assert.arrayOfBuffer | |
| 86 | -* assert.arrayOfFunc | |
| 87 | -* assert.arrayOfNumber | |
| 88 | -* assert.arrayOfObject | |
| 89 | -* assert.arrayOfString | |
| 90 | -* assert.arrayOfStream | |
| 91 | -* assert.arrayOfDate | |
| 92 | -* assert.arrayOfUuid | |
| 93 | -* assert.optionalArray | |
| 94 | -* assert.optionalBool | |
| 95 | -* assert.optionalBuffer | |
| 96 | -* assert.optionalFunc | |
| 97 | -* assert.optionalNumber | |
| 98 | -* assert.optionalObject | |
| 99 | -* assert.optionalString | |
| 100 | -* assert.optionalStream | |
| 101 | -* assert.optionalDate | |
| 102 | -* assert.optionalUuid | |
| 103 | -* assert.optionalArrayOfArray | |
| 104 | -* assert.optionalArrayOfBool | |
| 105 | -* assert.optionalArrayOfBuffer | |
| 106 | -* assert.optionalArrayOfFunc | |
| 107 | -* assert.optionalArrayOfNumber | |
| 108 | -* assert.optionalArrayOfObject | |
| 109 | -* assert.optionalArrayOfString | |
| 110 | -* assert.optionalArrayOfStream | |
| 111 | -* assert.optionalArrayOfDate | |
| 112 | -* assert.optionalArrayOfUuid | |
| 113 | -* assert.AssertionError | |
| 114 | -* assert.fail | |
| 115 | -* assert.ok | |
| 116 | -* assert.equal | |
| 117 | -* assert.notEqual | |
| 118 | -* assert.deepEqual | |
| 119 | -* assert.notDeepEqual | |
| 120 | -* assert.strictEqual | |
| 121 | -* assert.notStrictEqual | |
| 122 | -* assert.throws | |
| 123 | -* assert.doesNotThrow | |
| 124 | -* assert.ifError | |
| 125 | - | |
| 126 | -# Installation | |
| 127 | - | |
| 128 | - npm install assert-plus | |
| 129 | - | |
| 130 | -## License | |
| 131 | - | |
| 132 | -The MIT License (MIT) | |
| 133 | -Copyright (c) 2012 Mark Cavage | |
| 134 | - | |
| 135 | -Permission is hereby granted, free of charge, to any person obtaining a copy of | |
| 136 | -this software and associated documentation files (the "Software"), to deal in | |
| 137 | -the Software without restriction, including without limitation the rights to | |
| 138 | -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | |
| 139 | -the Software, and to permit persons to whom the Software is furnished to do so, | |
| 140 | -subject to the following conditions: | |
| 141 | - | |
| 142 | -The above copyright notice and this permission notice shall be included in all | |
| 143 | -copies or substantial portions of the Software. | |
| 144 | - | |
| 145 | -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 146 | -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 147 | -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 148 | -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 149 | -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
| 150 | -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
| 151 | -SOFTWARE. | |
| 152 | - | |
| 153 | -## Bugs | |
| 154 | - | |
| 155 | -See <https://github.com/mcavage/node-assert-plus/issues>. |
node_modules/assert-plus/assert.js
| ... | ... | @@ -1,206 +0,0 @@ |
| 1 | -// Copyright (c) 2012, Mark Cavage. All rights reserved. | |
| 2 | -// Copyright 2015 Joyent, Inc. | |
| 3 | - | |
| 4 | -var assert = require('assert'); | |
| 5 | -var Stream = require('stream').Stream; | |
| 6 | -var util = require('util'); | |
| 7 | - | |
| 8 | - | |
| 9 | -///--- Globals | |
| 10 | - | |
| 11 | -/* JSSTYLED */ | |
| 12 | -var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/; | |
| 13 | - | |
| 14 | - | |
| 15 | -///--- Internal | |
| 16 | - | |
| 17 | -function _capitalize(str) { | |
| 18 | - return (str.charAt(0).toUpperCase() + str.slice(1)); | |
| 19 | -} | |
| 20 | - | |
| 21 | -function _toss(name, expected, oper, arg, actual) { | |
| 22 | - throw new assert.AssertionError({ | |
| 23 | - message: util.format('%s (%s) is required', name, expected), | |
| 24 | - actual: (actual === undefined) ? typeof (arg) : actual(arg), | |
| 25 | - expected: expected, | |
| 26 | - operator: oper || '===', | |
| 27 | - stackStartFunction: _toss.caller | |
| 28 | - }); | |
| 29 | -} | |
| 30 | - | |
| 31 | -function _getClass(arg) { | |
| 32 | - return (Object.prototype.toString.call(arg).slice(8, -1)); | |
| 33 | -} | |
| 34 | - | |
| 35 | -function noop() { | |
| 36 | - // Why even bother with asserts? | |
| 37 | -} | |
| 38 | - | |
| 39 | - | |
| 40 | -///--- Exports | |
| 41 | - | |
| 42 | -var types = { | |
| 43 | - bool: { | |
| 44 | - check: function (arg) { return typeof (arg) === 'boolean'; } | |
| 45 | - }, | |
| 46 | - func: { | |
| 47 | - check: function (arg) { return typeof (arg) === 'function'; } | |
| 48 | - }, | |
| 49 | - string: { | |
| 50 | - check: function (arg) { return typeof (arg) === 'string'; } | |
| 51 | - }, | |
| 52 | - object: { | |
| 53 | - check: function (arg) { | |
| 54 | - return typeof (arg) === 'object' && arg !== null; | |
| 55 | - } | |
| 56 | - }, | |
| 57 | - number: { | |
| 58 | - check: function (arg) { | |
| 59 | - return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg); | |
| 60 | - } | |
| 61 | - }, | |
| 62 | - buffer: { | |
| 63 | - check: function (arg) { return Buffer.isBuffer(arg); }, | |
| 64 | - operator: 'Buffer.isBuffer' | |
| 65 | - }, | |
| 66 | - array: { | |
| 67 | - check: function (arg) { return Array.isArray(arg); }, | |
| 68 | - operator: 'Array.isArray' | |
| 69 | - }, | |
| 70 | - stream: { | |
| 71 | - check: function (arg) { return arg instanceof Stream; }, | |
| 72 | - operator: 'instanceof', | |
| 73 | - actual: _getClass | |
| 74 | - }, | |
| 75 | - date: { | |
| 76 | - check: function (arg) { return arg instanceof Date; }, | |
| 77 | - operator: 'instanceof', | |
| 78 | - actual: _getClass | |
| 79 | - }, | |
| 80 | - regexp: { | |
| 81 | - check: function (arg) { return arg instanceof RegExp; }, | |
| 82 | - operator: 'instanceof', | |
| 83 | - actual: _getClass | |
| 84 | - }, | |
| 85 | - uuid: { | |
| 86 | - check: function (arg) { | |
| 87 | - return typeof (arg) === 'string' && UUID_REGEXP.test(arg); | |
| 88 | - }, | |
| 89 | - operator: 'isUUID' | |
| 90 | - } | |
| 91 | -}; | |
| 92 | - | |
| 93 | -function _setExports(ndebug) { | |
| 94 | - var keys = Object.keys(types); | |
| 95 | - var out; | |
| 96 | - | |
| 97 | - /* re-export standard assert */ | |
| 98 | - if (process.env.NODE_NDEBUG) { | |
| 99 | - out = noop; | |
| 100 | - } else { | |
| 101 | - out = function (arg, msg) { | |
| 102 | - if (!arg) { | |
| 103 | - _toss(msg, 'true', arg); | |
| 104 | - } | |
| 105 | - }; | |
| 106 | - } | |
| 107 | - | |
| 108 | - /* standard checks */ | |
| 109 | - keys.forEach(function (k) { | |
| 110 | - if (ndebug) { | |
| 111 | - out[k] = noop; | |
| 112 | - return; | |
| 113 | - } | |
| 114 | - var type = types[k]; | |
| 115 | - out[k] = function (arg, msg) { | |
| 116 | - if (!type.check(arg)) { | |
| 117 | - _toss(msg, k, type.operator, arg, type.actual); | |
| 118 | - } | |
| 119 | - }; | |
| 120 | - }); | |
| 121 | - | |
| 122 | - /* optional checks */ | |
| 123 | - keys.forEach(function (k) { | |
| 124 | - var name = 'optional' + _capitalize(k); | |
| 125 | - if (ndebug) { | |
| 126 | - out[name] = noop; | |
| 127 | - return; | |
| 128 | - } | |
| 129 | - var type = types[k]; | |
| 130 | - out[name] = function (arg, msg) { | |
| 131 | - if (arg === undefined || arg === null) { | |
| 132 | - return; | |
| 133 | - } | |
| 134 | - if (!type.check(arg)) { | |
| 135 | - _toss(msg, k, type.operator, arg, type.actual); | |
| 136 | - } | |
| 137 | - }; | |
| 138 | - }); | |
| 139 | - | |
| 140 | - /* arrayOf checks */ | |
| 141 | - keys.forEach(function (k) { | |
| 142 | - var name = 'arrayOf' + _capitalize(k); | |
| 143 | - if (ndebug) { | |
| 144 | - out[name] = noop; | |
| 145 | - return; | |
| 146 | - } | |
| 147 | - var type = types[k]; | |
| 148 | - var expected = '[' + k + ']'; | |
| 149 | - out[name] = function (arg, msg) { | |
| 150 | - if (!Array.isArray(arg)) { | |
| 151 | - _toss(msg, expected, type.operator, arg, type.actual); | |
| 152 | - } | |
| 153 | - var i; | |
| 154 | - for (i = 0; i < arg.length; i++) { | |
| 155 | - if (!type.check(arg[i])) { | |
| 156 | - _toss(msg, expected, type.operator, arg, type.actual); | |
| 157 | - } | |
| 158 | - } | |
| 159 | - }; | |
| 160 | - }); | |
| 161 | - | |
| 162 | - /* optionalArrayOf checks */ | |
| 163 | - keys.forEach(function (k) { | |
| 164 | - var name = 'optionalArrayOf' + _capitalize(k); | |
| 165 | - if (ndebug) { | |
| 166 | - out[name] = noop; | |
| 167 | - return; | |
| 168 | - } | |
| 169 | - var type = types[k]; | |
| 170 | - var expected = '[' + k + ']'; | |
| 171 | - out[name] = function (arg, msg) { | |
| 172 | - if (arg === undefined || arg === null) { | |
| 173 | - return; | |
| 174 | - } | |
| 175 | - if (!Array.isArray(arg)) { | |
| 176 | - _toss(msg, expected, type.operator, arg, type.actual); | |
| 177 | - } | |
| 178 | - var i; | |
| 179 | - for (i = 0; i < arg.length; i++) { | |
| 180 | - if (!type.check(arg[i])) { | |
| 181 | - _toss(msg, expected, type.operator, arg, type.actual); | |
| 182 | - } | |
| 183 | - } | |
| 184 | - }; | |
| 185 | - }); | |
| 186 | - | |
| 187 | - /* re-export built-in assertions */ | |
| 188 | - Object.keys(assert).forEach(function (k) { | |
| 189 | - if (k === 'AssertionError') { | |
| 190 | - out[k] = assert[k]; | |
| 191 | - return; | |
| 192 | - } | |
| 193 | - if (ndebug) { | |
| 194 | - out[k] = noop; | |
| 195 | - return; | |
| 196 | - } | |
| 197 | - out[k] = assert[k]; | |
| 198 | - }); | |
| 199 | - | |
| 200 | - /* export ourselves (for unit tests _only_) */ | |
| 201 | - out._setExports = _setExports; | |
| 202 | - | |
| 203 | - return out; | |
| 204 | -} | |
| 205 | - | |
| 206 | -module.exports = _setExports(process.env.NODE_NDEBUG); |
node_modules/assert-plus/package.json
| ... | ... | @@ -1,82 +0,0 @@ |
| 1 | -{ | |
| 2 | - "_from": "assert-plus@^0.2.0", | |
| 3 | - "_id": "assert-plus@0.2.0", | |
| 4 | - "_inBundle": false, | |
| 5 | - "_integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", | |
| 6 | - "_location": "/assert-plus", | |
| 7 | - "_phantomChildren": {}, | |
| 8 | - "_requested": { | |
| 9 | - "type": "range", | |
| 10 | - "registry": true, | |
| 11 | - "raw": "assert-plus@^0.2.0", | |
| 12 | - "name": "assert-plus", | |
| 13 | - "escapedName": "assert-plus", | |
| 14 | - "rawSpec": "^0.2.0", | |
| 15 | - "saveSpec": null, | |
| 16 | - "fetchSpec": "^0.2.0" | |
| 17 | - }, | |
| 18 | - "_requiredBy": [ | |
| 19 | - "/http-signature" | |
| 20 | - ], | |
| 21 | - "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", | |
| 22 | - "_shasum": "d74e1b87e7affc0db8aadb7021f3fe48101ab234", | |
| 23 | - "_spec": "assert-plus@^0.2.0", | |
| 24 | - "_where": "C:\\Users\\admin\\Documents\\express-project\\node_modules\\http-signature", | |
| 25 | - "author": { | |
| 26 | - "name": "Mark Cavage", | |
| 27 | - "email": "mcavage@gmail.com" | |
| 28 | - }, | |
| 29 | - "bugs": { | |
| 30 | - "url": "https://github.com/mcavage/node-assert-plus/issues" | |
| 31 | - }, | |
| 32 | - "bundleDependencies": false, | |
| 33 | - "contributors": [ | |
| 34 | - { | |
| 35 | - "name": "Dave Eddy", | |
| 36 | - "email": "dave@daveeddy.com" | |
| 37 | - }, | |
| 38 | - { | |
| 39 | - "name": "Fred Kuo", | |
| 40 | - "email": "fred.kuo@joyent.com" | |
| 41 | - }, | |
| 42 | - { | |
| 43 | - "name": "Lars-Magnus Skog", | |
| 44 | - "email": "ralphtheninja@riseup.net" | |
| 45 | - }, | |
| 46 | - { | |
| 47 | - "name": "Mark Cavage", | |
| 48 | - "email": "mcavage@gmail.com" | |
| 49 | - }, | |
| 50 | - { | |
| 51 | - "name": "Patrick Mooney", | |
| 52 | - "email": "pmooney@pfmooney.com" | |
| 53 | - }, | |
| 54 | - { | |
| 55 | - "name": "Rob Gulewich", | |
| 56 | - "email": "robert.gulewich@joyent.com" | |
| 57 | - } | |
| 58 | - ], | |
| 59 | - "dependencies": {}, | |
| 60 | - "deprecated": false, | |
| 61 | - "description": "Extra assertions on top of node's assert module", | |
| 62 | - "devDependencies": { | |
| 63 | - "faucet": "0.0.1", | |
| 64 | - "tape": "4.2.2" | |
| 65 | - }, | |
| 66 | - "engines": { | |
| 67 | - "node": ">=0.8" | |
| 68 | - }, | |
| 69 | - "homepage": "https://github.com/mcavage/node-assert-plus#readme", | |
| 70 | - "license": "MIT", | |
| 71 | - "main": "./assert.js", | |
| 72 | - "name": "assert-plus", | |
| 73 | - "optionalDependencies": {}, | |
| 74 | - "repository": { | |
| 75 | - "type": "git", | |
| 76 | - "url": "git+https://github.com/mcavage/node-assert-plus.git" | |
| 77 | - }, | |
| 78 | - "scripts": { | |
| 79 | - "test": "tape tests/*.js | ./node_modules/.bin/faucet" | |
| 80 | - }, | |
| 81 | - "version": "0.2.0" | |
| 82 | -} |
node_modules/async/CHANGELOG.md
| ... | ... | @@ -1,269 +0,0 @@ |
| 1 | -# v2.6.1 | |
| 2 | -- Updated lodash to prevent `npm audit` warnings. (#1532, #1533) | |
| 3 | -- Made `async-es` more optimized for webpack users (#1517) | |
| 4 | -- Fixed a stack overflow with large collections and a synchronous iterator (#1514) | |
| 5 | -- Various small fixes/chores (#1505, #1511, #1527, #1530) | |
| 6 | - | |
| 7 | -# v2.6.0 | |
| 8 | -- Added missing aliases for many methods. Previously, you could not (e.g.) `require('async/find')` or use `async.anyLimit`. (#1483) | |
| 9 | -- Improved `queue` performance. (#1448, #1454) | |
| 10 | -- Add missing sourcemap (#1452, #1453) | |
| 11 | -- Various doc updates (#1448, #1471, #1483) | |
| 12 | - | |
| 13 | -# v2.5.0 | |
| 14 | -- Added `concatLimit`, the `Limit` equivalent of [`concat`](https://caolan.github.io/async/docs.html#concat) ([#1426](https://github.com/caolan/async/issues/1426), [#1430](https://github.com/caolan/async/pull/1430)) | |
| 15 | -- `concat` improvements: it now preserves order, handles falsy values and the `iteratee` callback takes a variable number of arguments ([#1437](https://github.com/caolan/async/issues/1437), [#1436](https://github.com/caolan/async/pull/1436)) | |
| 16 | -- Fixed an issue in `queue` where there was a size discrepancy between `workersList().length` and `running()` ([#1428](https://github.com/caolan/async/issues/1428), [#1429](https://github.com/caolan/async/pull/1429)) | |
| 17 | -- Various doc fixes ([#1422](https://github.com/caolan/async/issues/1422), [#1424](https://github.com/caolan/async/pull/1424)) | |
| 18 | - | |
| 19 | -# v2.4.1 | |
| 20 | -- Fixed a bug preventing functions wrapped with `timeout()` from being re-used. ([#1418](https://github.com/caolan/async/issues/1418), [#1419](https://github.com/caolan/async/issues/1419)) | |
| 21 | - | |
| 22 | -# v2.4.0 | |
| 23 | -- Added `tryEach`, for running async functions in parallel, where you only expect one to succeed. ([#1365](https://github.com/caolan/async/issues/1365), [#687](https://github.com/caolan/async/issues/687)) | |
| 24 | -- Improved performance, most notably in `parallel` and `waterfall` ([#1395](https://github.com/caolan/async/issues/1395)) | |
| 25 | -- Added `queue.remove()`, for removing items in a `queue` ([#1397](https://github.com/caolan/async/issues/1397), [#1391](https://github.com/caolan/async/issues/1391)) | |
| 26 | -- Fixed using `eval`, preventing Async from running in pages with Content Security Policy ([#1404](https://github.com/caolan/async/issues/1404), [#1403](https://github.com/caolan/async/issues/1403)) | |
| 27 | -- Fixed errors thrown in an `asyncify`ed function's callback being caught by the underlying Promise ([#1408](https://github.com/caolan/async/issues/1408)) | |
| 28 | -- Fixed timing of `queue.empty()` ([#1367](https://github.com/caolan/async/issues/1367)) | |
| 29 | -- Various doc fixes ([#1314](https://github.com/caolan/async/issues/1314), [#1394](https://github.com/caolan/async/issues/1394), [#1412](https://github.com/caolan/async/issues/1412)) | |
| 30 | - | |
| 31 | -# v2.3.0 | |
| 32 | -- Added support for ES2017 `async` functions. Wherever you can pass a Node-style/CPS function that uses a callback, you can also pass an `async` function. Previously, you had to wrap `async` functions with `asyncify`. The caveat is that it will only work if `async` functions are supported natively in your environment, transpiled implementations can't be detected. ([#1386](https://github.com/caolan/async/issues/1386), [#1390](https://github.com/caolan/async/issues/1390)) | |
| 33 | -- Small doc fix ([#1392](https://github.com/caolan/async/issues/1392)) | |
| 34 | - | |
| 35 | -# v2.2.0 | |
| 36 | -- Added `groupBy`, and the `Series`/`Limit` equivalents, analogous to [`_.groupBy`](http://lodash.com/docs#groupBy) ([#1364](https://github.com/caolan/async/issues/1364)) | |
| 37 | -- Fixed `transform` bug when `callback` was not passed ([#1381](https://github.com/caolan/async/issues/1381)) | |
| 38 | -- Added note about `reflect` to `parallel` docs ([#1385](https://github.com/caolan/async/issues/1385)) | |
| 39 | - | |
| 40 | -# v2.1.5 | |
| 41 | -- Fix `auto` bug when function names collided with Array.prototype ([#1358](https://github.com/caolan/async/issues/1358)) | |
| 42 | -- Improve some error messages ([#1349](https://github.com/caolan/async/issues/1349)) | |
| 43 | -- Avoid stack overflow case in queue | |
| 44 | -- Fixed an issue in `some`, `every` and `find` where processing would continue after the result was determined. | |
| 45 | -- Cleanup implementations of `some`, `every` and `find` | |
| 46 | - | |
| 47 | -# v2.1.3 | |
| 48 | -- Make bundle size smaller | |
| 49 | -- Create optimized hotpath for `filter` in array case. | |
| 50 | - | |
| 51 | -# v2.1.2 | |
| 52 | -- Fixed a stackoverflow bug with `detect`, `some`, `every` on large inputs ([#1293](https://github.com/caolan/async/issues/1293)). | |
| 53 | - | |
| 54 | -# v2.1.0 | |
| 55 | - | |
| 56 | -- `retry` and `retryable` now support an optional `errorFilter` function that determines if the `task` should retry on the error ([#1256](https://github.com/caolan/async/issues/1256), [#1261](https://github.com/caolan/async/issues/1261)) | |
| 57 | -- Optimized array iteration in `race`, `cargo`, `queue`, and `priorityQueue` ([#1253](https://github.com/caolan/async/issues/1253)) | |
| 58 | -- Added alias documentation to doc site ([#1251](https://github.com/caolan/async/issues/1251), [#1254](https://github.com/caolan/async/issues/1254)) | |
| 59 | -- Added [BootStrap scrollspy](http://getbootstrap.com/javascript/#scrollspy) to docs to highlight in the sidebar the current method being viewed ([#1289](https://github.com/caolan/async/issues/1289), [#1300](https://github.com/caolan/async/issues/1300)) | |
| 60 | -- Various minor doc fixes ([#1263](https://github.com/caolan/async/issues/1263), [#1264](https://github.com/caolan/async/issues/1264), [#1271](https://github.com/caolan/async/issues/1271), [#1278](https://github.com/caolan/async/issues/1278), [#1280](https://github.com/caolan/async/issues/1280), [#1282](https://github.com/caolan/async/issues/1282), [#1302](https://github.com/caolan/async/issues/1302)) | |
| 61 | - | |
| 62 | -# v2.0.1 | |
| 63 | - | |
| 64 | -- Significantly optimized all iteration based collection methods such as `each`, `map`, `filter`, etc ([#1245](https://github.com/caolan/async/issues/1245), [#1246](https://github.com/caolan/async/issues/1246), [#1247](https://github.com/caolan/async/issues/1247)). | |
| 65 | - | |
| 66 | -# v2.0.0 | |
| 67 | - | |
| 68 | -Lots of changes here! | |
| 69 | - | |
| 70 | -First and foremost, we have a slick new [site for docs](https://caolan.github.io/async/). Special thanks to [**@hargasinski**](https://github.com/hargasinski) for his work converting our old docs to `jsdoc` format and implementing the new website. Also huge ups to [**@ivanseidel**](https://github.com/ivanseidel) for designing our new logo. It was a long process for both of these tasks, but I think these changes turned out extraordinary well. | |
| 71 | - | |
| 72 | -The biggest feature is modularization. You can now `require("async/series")` to only require the `series` function. Every Async library function is available this way. You still can `require("async")` to require the entire library, like you could do before. | |
| 73 | - | |
| 74 | -We also provide Async as a collection of ES2015 modules. You can now `import {each} from 'async-es'` or `import waterfall from 'async-es/waterfall'`. If you are using only a few Async functions, and are using a ES bundler such as Rollup, this can significantly lower your build size. | |
| 75 | - | |
| 76 | -Major thanks to [**@Kikobeats**](github.com/Kikobeats), [**@aearly**](github.com/aearly) and [**@megawac**](github.com/megawac) for doing the majority of the modularization work, as well as [**@jdalton**](github.com/jdalton) and [**@Rich-Harris**](github.com/Rich-Harris) for advisory work on the general modularization strategy. | |
| 77 | - | |
| 78 | -Another one of the general themes of the 2.0 release is standardization of what an "async" function is. We are now more strictly following the node-style continuation passing style. That is, an async function is a function that: | |
| 79 | - | |
| 80 | -1. Takes a variable number of arguments | |
| 81 | -2. The last argument is always a callback | |
| 82 | -3. The callback can accept any number of arguments | |
| 83 | -4. The first argument passed to the callback will be treated as an error result, if the argument is truthy | |
| 84 | -5. Any number of result arguments can be passed after the "error" argument | |
| 85 | -6. The callback is called once and exactly once, either on the same tick or later tick of the JavaScript event loop. | |
| 86 | - | |
| 87 | -There were several cases where Async accepted some functions that did not strictly have these properties, most notably `auto`, `every`, `some`, `filter`, `reject` and `detect`. | |
| 88 | - | |
| 89 | -Another theme is performance. We have eliminated internal deferrals in all cases where they make sense. For example, in `waterfall` and `auto`, there was a `setImmediate` between each task -- these deferrals have been removed. A `setImmediate` call can add up to 1ms of delay. This might not seem like a lot, but it can add up if you are using many Async functions in the course of processing a HTTP request, for example. Nearly all asynchronous functions that do I/O already have some sort of deferral built in, so the extra deferral is unnecessary. The trade-off of this change is removing our built-in stack-overflow defense. Many synchronous callback calls in series can quickly overflow the JS call stack. If you do have a function that is sometimes synchronous (calling its callback on the same tick), and are running into stack overflows, wrap it with `async.ensureAsync()`. | |
| 90 | - | |
| 91 | -Another big performance win has been re-implementing `queue`, `cargo`, and `priorityQueue` with [doubly linked lists](https://en.wikipedia.org/wiki/Doubly_linked_list) instead of arrays. This has lead to queues being an order of [magnitude faster on large sets of tasks](https://github.com/caolan/async/pull/1205). | |
| 92 | - | |
| 93 | -## New Features | |
| 94 | - | |
| 95 | -- Async is now modularized. Individual functions can be `require()`d from the main package. (`require('async/auto')`) ([#984](https://github.com/caolan/async/issues/984), [#996](https://github.com/caolan/async/issues/996)) | |
| 96 | -- Async is also available as a collection of ES2015 modules in the new `async-es` package. (`import {forEachSeries} from 'async-es'`) ([#984](https://github.com/caolan/async/issues/984), [#996](https://github.com/caolan/async/issues/996)) | |
| 97 | -- Added `race`, analogous to `Promise.race()`. It will run an array of async tasks in parallel and will call its callback with the result of the first task to respond. ([#568](https://github.com/caolan/async/issues/568), [#1038](https://github.com/caolan/async/issues/1038)) | |
| 98 | -- Collection methods now accept ES2015 iterators. Maps, Sets, and anything that implements the iterator spec can now be passed directly to `each`, `map`, `parallel`, etc.. ([#579](https://github.com/caolan/async/issues/579), [#839](https://github.com/caolan/async/issues/839), [#1074](https://github.com/caolan/async/issues/1074)) | |
| 99 | -- Added `mapValues`, for mapping over the properties of an object and returning an object with the same keys. ([#1157](https://github.com/caolan/async/issues/1157), [#1177](https://github.com/caolan/async/issues/1177)) | |
| 100 | -- Added `timeout`, a wrapper for an async function that will make the task time-out after the specified time. ([#1007](https://github.com/caolan/async/issues/1007), [#1027](https://github.com/caolan/async/issues/1027)) | |
| 101 | -- Added `reflect` and `reflectAll`, analagous to [`Promise.reflect()`](http://bluebirdjs.com/docs/api/reflect.html), a wrapper for async tasks that always succeeds, by gathering results and errors into an object. ([#942](https://github.com/caolan/async/issues/942), [#1012](https://github.com/caolan/async/issues/1012), [#1095](https://github.com/caolan/async/issues/1095)) | |
| 102 | -- `constant` supports dynamic arguments -- it will now always use its last argument as the callback. ([#1016](https://github.com/caolan/async/issues/1016), [#1052](https://github.com/caolan/async/issues/1052)) | |
| 103 | -- `setImmediate` and `nextTick` now support arguments to partially apply to the deferred function, like the node-native versions do. ([#940](https://github.com/caolan/async/issues/940), [#1053](https://github.com/caolan/async/issues/1053)) | |
| 104 | -- `auto` now supports resolving cyclic dependencies using [Kahn's algorithm](https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm) ([#1140](https://github.com/caolan/async/issues/1140)). | |
| 105 | -- Added `autoInject`, a relative of `auto` that automatically spreads a task's dependencies as arguments to the task function. ([#608](https://github.com/caolan/async/issues/608), [#1055](https://github.com/caolan/async/issues/1055), [#1099](https://github.com/caolan/async/issues/1099), [#1100](https://github.com/caolan/async/issues/1100)) | |
| 106 | -- You can now limit the concurrency of `auto` tasks. ([#635](https://github.com/caolan/async/issues/635), [#637](https://github.com/caolan/async/issues/637)) | |
| 107 | -- Added `retryable`, a relative of `retry` that wraps an async function, making it retry when called. ([#1058](https://github.com/caolan/async/issues/1058)) | |
| 108 | -- `retry` now supports specifying a function that determines the next time interval, useful for exponential backoff, logging and other retry strategies. ([#1161](https://github.com/caolan/async/issues/1161)) | |
| 109 | -- `retry` will now pass all of the arguments the task function was resolved with to the callback ([#1231](https://github.com/caolan/async/issues/1231)). | |
| 110 | -- Added `q.unsaturated` -- callback called when a `queue`'s number of running workers falls below a threshold. ([#868](https://github.com/caolan/async/issues/868), [#1030](https://github.com/caolan/async/issues/1030), [#1033](https://github.com/caolan/async/issues/1033), [#1034](https://github.com/caolan/async/issues/1034)) | |
| 111 | -- Added `q.error` -- a callback called whenever a `queue` task calls its callback with an error. ([#1170](https://github.com/caolan/async/issues/1170)) | |
| 112 | -- `applyEach` and `applyEachSeries` now pass results to the final callback. ([#1088](https://github.com/caolan/async/issues/1088)) | |
| 113 | - | |
| 114 | -## Breaking changes | |
| 115 | - | |
| 116 | -- Calling a callback more than once is considered an error, and an error will be thrown. This had an explicit breaking change in `waterfall`. If you were relying on this behavior, you should more accurately represent your control flow as an event emitter or stream. ([#814](https://github.com/caolan/async/issues/814), [#815](https://github.com/caolan/async/issues/815), [#1048](https://github.com/caolan/async/issues/1048), [#1050](https://github.com/caolan/async/issues/1050)) | |
| 117 | -- `auto` task functions now always take the callback as the last argument. If a task has dependencies, the `results` object will be passed as the first argument. To migrate old task functions, wrap them with [`_.flip`](https://lodash.com/docs#flip) ([#1036](https://github.com/caolan/async/issues/1036), [#1042](https://github.com/caolan/async/issues/1042)) | |
| 118 | -- Internal `setImmediate` calls have been refactored away. This may make existing flows vulnerable to stack overflows if you use many synchronous functions in series. Use `ensureAsync` to work around this. ([#696](https://github.com/caolan/async/issues/696), [#704](https://github.com/caolan/async/issues/704), [#1049](https://github.com/caolan/async/issues/1049), [#1050](https://github.com/caolan/async/issues/1050)) | |
| 119 | -- `map` used to return an object when iterating over an object. `map` now always returns an array, like in other libraries. The previous object behavior has been split out into `mapValues`. ([#1157](https://github.com/caolan/async/issues/1157), [#1177](https://github.com/caolan/async/issues/1177)) | |
| 120 | -- `filter`, `reject`, `some`, `every`, `detect` and their families like `{METHOD}Series` and `{METHOD}Limit` now expect an error as the first callback argument, rather than just a simple boolean. Pass `null` as the first argument, or use `fs.access` instead of `fs.exists`. ([#118](https://github.com/caolan/async/issues/118), [#774](https://github.com/caolan/async/issues/774), [#1028](https://github.com/caolan/async/issues/1028), [#1041](https://github.com/caolan/async/issues/1041)) | |
| 121 | -- `{METHOD}` and `{METHOD}Series` are now implemented in terms of `{METHOD}Limit`. This is a major internal simplification, and is not expected to cause many problems, but it does subtly affect how functions execute internally. ([#778](https://github.com/caolan/async/issues/778), [#847](https://github.com/caolan/async/issues/847)) | |
| 122 | -- `retry`'s callback is now optional. Previously, omitting the callback would partially apply the function, meaning it could be passed directly as a task to `series` or `auto`. The partially applied "control-flow" behavior has been separated out into `retryable`. ([#1054](https://github.com/caolan/async/issues/1054), [#1058](https://github.com/caolan/async/issues/1058)) | |
| 123 | -- The test function for `whilst`, `until`, and `during` used to be passed non-error args from the iteratee function's callback, but this led to weirdness where the first call of the test function would be passed no args. We have made it so the test function is never passed extra arguments, and only the `doWhilst`, `doUntil`, and `doDuring` functions pass iteratee callback arguments to the test function ([#1217](https://github.com/caolan/async/issues/1217), [#1224](https://github.com/caolan/async/issues/1224)) | |
| 124 | -- The `q.tasks` array has been renamed `q._tasks` and is now implemented as a doubly linked list (DLL). Any code that used to interact with this array will need to be updated to either use the provided helpers or support DLLs ([#1205](https://github.com/caolan/async/issues/1205)). | |
| 125 | -- The timing of the `q.saturated()` callback in a `queue` has been modified to better reflect when tasks pushed to the queue will start queueing. ([#724](https://github.com/caolan/async/issues/724), [#1078](https://github.com/caolan/async/issues/1078)) | |
| 126 | -- Removed `iterator` method in favour of [ES2015 iterator protocol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators ) which natively supports arrays ([#1237](https://github.com/caolan/async/issues/1237)) | |
| 127 | -- Dropped support for Component, Jam, SPM, and Volo ([#1175](https://github.com/caolan/async/issues/1175), #[#176](https://github.com/caolan/async/issues/176)) | |
| 128 | - | |
| 129 | -## Bug Fixes | |
| 130 | - | |
| 131 | -- Improved handling of no dependency cases in `auto` & `autoInject` ([#1147](https://github.com/caolan/async/issues/1147)). | |
| 132 | -- Fixed a bug where the callback generated by `asyncify` with `Promises` could resolve twice ([#1197](https://github.com/caolan/async/issues/1197)). | |
| 133 | -- Fixed several documented optional callbacks not actually being optional ([#1223](https://github.com/caolan/async/issues/1223)). | |
| 134 | - | |
| 135 | -## Other | |
| 136 | - | |
| 137 | -- Added `someSeries` and `everySeries` for symmetry, as well as a complete set of `any`/`anyLimit`/`anySeries` and `all`/`/allLmit`/`allSeries` aliases. | |
| 138 | -- Added `find` as an alias for `detect. (as well as `findLimit` and `findSeries`). | |
| 139 | -- Various doc fixes ([#1005](https://github.com/caolan/async/issues/1005), [#1008](https://github.com/caolan/async/issues/1008), [#1010](https://github.com/caolan/async/issues/1010), [#1015](https://github.com/caolan/async/issues/1015), [#1021](https://github.com/caolan/async/issues/1021), [#1037](https://github.com/caolan/async/issues/1037), [#1039](https://github.com/caolan/async/issues/1039), [#1051](https://github.com/caolan/async/issues/1051), [#1102](https://github.com/caolan/async/issues/1102), [#1107](https://github.com/caolan/async/issues/1107), [#1121](https://github.com/caolan/async/issues/1121), [#1123](https://github.com/caolan/async/issues/1123), [#1129](https://github.com/caolan/async/issues/1129), [#1135](https://github.com/caolan/async/issues/1135), [#1138](https://github.com/caolan/async/issues/1138), [#1141](https://github.com/caolan/async/issues/1141), [#1153](https://github.com/caolan/async/issues/1153), [#1216](https://github.com/caolan/async/issues/1216), [#1217](https://github.com/caolan/async/issues/1217), [#1232](https://github.com/caolan/async/issues/1232), [#1233](https://github.com/caolan/async/issues/1233), [#1236](https://github.com/caolan/async/issues/1236), [#1238](https://github.com/caolan/async/issues/1238)) | |
| 140 | - | |
| 141 | -Thank you [**@aearly**](github.com/aearly) and [**@megawac**](github.com/megawac) for taking the lead on version 2 of async. | |
| 142 | - | |
| 143 | ------------------------------------------- | |
| 144 | - | |
| 145 | -# v1.5.2 | |
| 146 | -- Allow using `"constructor"` as an argument in `memoize` ([#998](https://github.com/caolan/async/issues/998)) | |
| 147 | -- Give a better error messsage when `auto` dependency checking fails ([#994](https://github.com/caolan/async/issues/994)) | |
| 148 | -- Various doc updates ([#936](https://github.com/caolan/async/issues/936), [#956](https://github.com/caolan/async/issues/956), [#979](https://github.com/caolan/async/issues/979), [#1002](https://github.com/caolan/async/issues/1002)) | |
| 149 | - | |
| 150 | -# v1.5.1 | |
| 151 | -- Fix issue with `pause` in `queue` with concurrency enabled ([#946](https://github.com/caolan/async/issues/946)) | |
| 152 | -- `while` and `until` now pass the final result to callback ([#963](https://github.com/caolan/async/issues/963)) | |
| 153 | -- `auto` will properly handle concurrency when there is no callback ([#966](https://github.com/caolan/async/issues/966)) | |
| 154 | -- `auto` will no. properly stop execution when an error occurs ([#988](https://github.com/caolan/async/issues/988), [#993](https://github.com/caolan/async/issues/993)) | |
| 155 | -- Various doc fixes ([#971](https://github.com/caolan/async/issues/971), [#980](https://github.com/caolan/async/issues/980)) | |
| 156 | - | |
| 157 | -# v1.5.0 | |
| 158 | - | |
| 159 | -- Added `transform`, analogous to [`_.transform`](http://lodash.com/docs#transform) ([#892](https://github.com/caolan/async/issues/892)) | |
| 160 | -- `map` now returns an object when an object is passed in, rather than array with non-numeric keys. `map` will begin always returning an array with numeric indexes in the next major release. ([#873](https://github.com/caolan/async/issues/873)) | |
| 161 | -- `auto` now accepts an optional `concurrency` argument to limit the number o. running tasks ([#637](https://github.com/caolan/async/issues/637)) | |
| 162 | -- Added `queue#workersList()`, to retrieve the lis. of currently running tasks. ([#891](https://github.com/caolan/async/issues/891)) | |
| 163 | -- Various code simplifications ([#896](https://github.com/caolan/async/issues/896), [#904](https://github.com/caolan/async/issues/904)) | |
| 164 | -- Various doc fixes :scroll: ([#890](https://github.com/caolan/async/issues/890), [#894](https://github.com/caolan/async/issues/894), [#903](https://github.com/caolan/async/issues/903), [#905](https://github.com/caolan/async/issues/905), [#912](https://github.com/caolan/async/issues/912)) | |
| 165 | - | |
| 166 | -# v1.4.2 | |
| 167 | - | |
| 168 | -- Ensure coverage files don't get published on npm ([#879](https://github.com/caolan/async/issues/879)) | |
| 169 | - | |
| 170 | -# v1.4.1 | |
| 171 | - | |
| 172 | -- Add in overlooked `detectLimit` method ([#866](https://github.com/caolan/async/issues/866)) | |
| 173 | -- Removed unnecessary files from npm releases ([#861](https://github.com/caolan/async/issues/861)) | |
| 174 | -- Removed usage of a reserved word to prevent :boom: in older environments ([#870](https://github.com/caolan/async/issues/870)) | |
| 175 | - | |
| 176 | -# v1.4.0 | |
| 177 | - | |
| 178 | -- `asyncify` now supports promises ([#840](https://github.com/caolan/async/issues/840)) | |
| 179 | -- Added `Limit` versions of `filter` and `reject` ([#836](https://github.com/caolan/async/issues/836)) | |
| 180 | -- Add `Limit` versions of `detect`, `some` and `every` ([#828](https://github.com/caolan/async/issues/828), [#829](https://github.com/caolan/async/issues/829)) | |
| 181 | -- `some`, `every` and `detect` now short circuit early ([#828](https://github.com/caolan/async/issues/828), [#829](https://github.com/caolan/async/issues/829)) | |
| 182 | -- Improve detection of the global object ([#804](https://github.com/caolan/async/issues/804)), enabling use in WebWorkers | |
| 183 | -- `whilst` now called with arguments from iterator ([#823](https://github.com/caolan/async/issues/823)) | |
| 184 | -- `during` now gets called with arguments from iterator ([#824](https://github.com/caolan/async/issues/824)) | |
| 185 | -- Code simplifications and optimizations aplenty ([diff](https://github.com/caolan/async/compare/v1.3.0...v1.4.0)) | |
| 186 | - | |
| 187 | - | |
| 188 | -# v1.3.0 | |
| 189 | - | |
| 190 | -New Features: | |
| 191 | -- Added `constant` | |
| 192 | -- Added `asyncify`/`wrapSync` for making sync functions work with callbacks. ([#671](https://github.com/caolan/async/issues/671), [#806](https://github.com/caolan/async/issues/806)) | |
| 193 | -- Added `during` and `doDuring`, which are like `whilst` with an async truth test. ([#800](https://github.com/caolan/async/issues/800)) | |
| 194 | -- `retry` now accepts an `interval` parameter to specify a delay between retries. ([#793](https://github.com/caolan/async/issues/793)) | |
| 195 | -- `async` should work better in Web Workers due to better `root` detection ([#804](https://github.com/caolan/async/issues/804)) | |
| 196 | -- Callbacks are now optional in `whilst`, `doWhilst`, `until`, and `doUntil` ([#642](https://github.com/caolan/async/issues/642)) | |
| 197 | -- Various internal updates ([#786](https://github.com/caolan/async/issues/786), [#801](https://github.com/caolan/async/issues/801), [#802](https://github.com/caolan/async/issues/802), [#803](https://github.com/caolan/async/issues/803)) | |
| 198 | -- Various doc fixes ([#790](https://github.com/caolan/async/issues/790), [#794](https://github.com/caolan/async/issues/794)) | |
| 199 | - | |
| 200 | -Bug Fixes: | |
| 201 | -- `cargo` now exposes the `payload` size, and `cargo.payload` can be changed on the fly after the `cargo` is created. ([#740](https://github.com/caolan/async/issues/740), [#744](https://github.com/caolan/async/issues/744), [#783](https://github.com/caolan/async/issues/783)) | |
| 202 | - | |
| 203 | - | |
| 204 | -# v1.2.1 | |
| 205 | - | |
| 206 | -Bug Fix: | |
| 207 | - | |
| 208 | -- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. ([#782](https://github.com/caolan/async/issues/782)) | |
| 209 | - | |
| 210 | - | |
| 211 | -# v1.2.0 | |
| 212 | - | |
| 213 | -New Features: | |
| 214 | - | |
| 215 | -- Added `timesLimit` ([#743](https://github.com/caolan/async/issues/743)) | |
| 216 | -- `concurrency` can be changed after initialization in `queue` by setting `q.concurrency`. The new concurrency will be reflected the next time a task is processed. ([#747](https://github.com/caolan/async/issues/747), [#772](https://github.com/caolan/async/issues/772)) | |
| 217 | - | |
| 218 | -Bug Fixes: | |
| 219 | - | |
| 220 | -- Fixed a regression in `each` and family with empty arrays that have additional properties. ([#775](https://github.com/caolan/async/issues/775), [#777](https://github.com/caolan/async/issues/777)) | |
| 221 | - | |
| 222 | - | |
| 223 | -# v1.1.1 | |
| 224 | - | |
| 225 | -Bug Fix: | |
| 226 | - | |
| 227 | -- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. ([#782](https://github.com/caolan/async/issues/782)) | |
| 228 | - | |
| 229 | - | |
| 230 | -# v1.1.0 | |
| 231 | - | |
| 232 | -New Features: | |
| 233 | - | |
| 234 | -- `cargo` now supports all of the same methods and event callbacks as `queue`. | |
| 235 | -- Added `ensureAsync` - A wrapper that ensures an async function calls its callback on a later tick. ([#769](https://github.com/caolan/async/issues/769)) | |
| 236 | -- Optimized `map`, `eachOf`, and `waterfall` families of functions | |
| 237 | -- Passing a `null` or `undefined` array to `map`, `each`, `parallel` and families will be treated as an empty array ([#667](https://github.com/caolan/async/issues/667)). | |
| 238 | -- The callback is now optional for the composed results of `compose` and `seq`. ([#618](https://github.com/caolan/async/issues/618)) | |
| 239 | -- Reduced file size by 4kb, (minified version by 1kb) | |
| 240 | -- Added code coverage through `nyc` and `coveralls` ([#768](https://github.com/caolan/async/issues/768)) | |
| 241 | - | |
| 242 | -Bug Fixes: | |
| 243 | - | |
| 244 | -- `forever` will no longer stack overflow with a synchronous iterator ([#622](https://github.com/caolan/async/issues/622)) | |
| 245 | -- `eachLimit` and other limit functions will stop iterating once an error occurs ([#754](https://github.com/caolan/async/issues/754)) | |
| 246 | -- Always pass `null` in callbacks when there is no error ([#439](https://github.com/caolan/async/issues/439)) | |
| 247 | -- Ensure proper conditions when calling `drain()` after pushing an empty data set to a queue ([#668](https://github.com/caolan/async/issues/668)) | |
| 248 | -- `each` and family will properly handle an empty array ([#578](https://github.com/caolan/async/issues/578)) | |
| 249 | -- `eachSeries` and family will finish if the underlying array is modified during execution ([#557](https://github.com/caolan/async/issues/557)) | |
| 250 | -- `queue` will throw if a non-function is passed to `q.push()` ([#593](https://github.com/caolan/async/issues/593)) | |
| 251 | -- Doc fixes ([#629](https://github.com/caolan/async/issues/629), [#766](https://github.com/caolan/async/issues/766)) | |
| 252 | - | |
| 253 | - | |
| 254 | -# v1.0.0 | |
| 255 | - | |
| 256 | -No known breaking changes, we are simply complying with semver from here on out. | |
| 257 | - | |
| 258 | -Changes: | |
| 259 | - | |
| 260 | -- Start using a changelog! | |
| 261 | -- Add `forEachOf` for iterating over Objects (or to iterate Arrays with indexes available) ([#168](https://github.com/caolan/async/issues/168) [#704](https://github.com/caolan/async/issues/704) [#321](https://github.com/caolan/async/issues/321)) | |
| 262 | -- Detect deadlocks in `auto` ([#663](https://github.com/caolan/async/issues/663)) | |
| 263 | -- Better support for require.js ([#527](https://github.com/caolan/async/issues/527)) | |
| 264 | -- Throw if queue created with concurrency `0` ([#714](https://github.com/caolan/async/issues/714)) | |
| 265 | -- Fix unneeded iteration in `queue.resume()` ([#758](https://github.com/caolan/async/issues/758)) | |
| 266 | -- Guard against timer mocking overriding `setImmediate` ([#609](https://github.com/caolan/async/issues/609) [#611](https://github.com/caolan/async/issues/611)) | |
| 267 | -- Miscellaneous doc fixes ([#542](https://github.com/caolan/async/issues/542) [#596](https://github.com/caolan/async/issues/596) [#615](https://github.com/caolan/async/issues/615) [#628](https://github.com/caolan/async/issues/628) [#631](https://github.com/caolan/async/issues/631) [#690](https://github.com/caolan/async/issues/690) [#729](https://github.com/caolan/async/issues/729)) | |
| 268 | -- Use single noop function internally ([#546](https://github.com/caolan/async/issues/546)) | |
| 269 | -- Optimize internal `_each`, `_map` and `_keys` functions. |
node_modules/async/LICENSE
| ... | ... | @@ -1,19 +0,0 @@ |
| 1 | -Copyright (c) 2010-2018 Caolan McMahon | |
| 2 | - | |
| 3 | -Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 4 | -of this software and associated documentation files (the "Software"), to deal | |
| 5 | -in the Software without restriction, including without limitation the rights | |
| 6 | -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| 7 | -copies of the Software, and to permit persons to whom the Software is | |
| 8 | -furnished to do so, subject to the following conditions: | |
| 9 | - | |
| 10 | -The above copyright notice and this permission notice shall be included in | |
| 11 | -all copies or substantial portions of the Software. | |
| 12 | - | |
| 13 | -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 14 | -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 15 | -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 16 | -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 17 | -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
| 18 | -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
| 19 | -THE SOFTWARE. |
node_modules/async/README.md
| ... | ... | @@ -1,56 +0,0 @@ |
| 1 | - | |
| 2 | - | |
| 3 | -[](https://travis-ci.org/caolan/async) | |
| 4 | -[](https://www.npmjs.com/package/async) | |
| 5 | -[](https://coveralls.io/r/caolan/async?branch=master) | |
| 6 | -[](https://gitter.im/caolan/async?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | |
| 7 | -[](https://www.libhive.com/providers/npm/packages/async) | |
| 8 | -[](https://www.jsdelivr.com/package/npm/async) | |
| 9 | - | |
| 10 | - | |
| 11 | -Async is a utility module which provides straight-forward, powerful functions for working with [asynchronous JavaScript](http://caolan.github.io/async/global.html). Although originally designed for use with [Node.js](https://nodejs.org/) and installable via `npm install --save async`, it can also be used directly in the browser. | |
| 12 | - | |
| 13 | -This version of the package is optimized for the Node.js environment. If you use Async with webpack, install [`async-es`](https://www.npmjs.com/package/async-es) instead. | |
| 14 | - | |
| 15 | -For Documentation, visit <https://caolan.github.io/async/> | |
| 16 | - | |
| 17 | -*For Async v1.5.x documentation, go [HERE](https://github.com/caolan/async/blob/v1.5.2/README.md)* | |
| 18 | - | |
| 19 | - | |
| 20 | -```javascript | |
| 21 | -// for use with Node-style callbacks... | |
| 22 | -var async = require("async"); | |
| 23 | - | |
| 24 | -var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"}; | |
| 25 | -var configs = {}; | |
| 26 | - | |
| 27 | -async.forEachOf(obj, (value, key, callback) => { | |
| 28 | - fs.readFile(__dirname + value, "utf8", (err, data) => { | |
| 29 | - if (err) return callback(err); | |
| 30 | - try { | |
| 31 | - configs[key] = JSON.parse(data); | |
| 32 | - } catch (e) { | |
| 33 | - return callback(e); | |
| 34 | - } | |
| 35 | - callback(); | |
| 36 | - }); | |
| 37 | -}, err => { | |
| 38 | - if (err) console.error(err.message); | |
| 39 | - // configs is now a map of JSON data | |
| 40 | - doSomethingWith(configs); | |
| 41 | -}); | |
| 42 | -``` | |
| 43 | - | |
| 44 | -```javascript | |
| 45 | -var async = require("async"); | |
| 46 | - | |
| 47 | -// ...or ES2017 async functions | |
| 48 | -async.mapLimit(urls, 5, async function(url) { | |
| 49 | - const response = await fetch(url) | |
| 50 | - return response.body | |
| 51 | -}, (err, results) => { | |
| 52 | - if (err) throw err | |
| 53 | - // results is now an array of the response bodies | |
| 54 | - console.log(results) | |
| 55 | -}) | |
| 56 | -``` |
node_modules/async/all.js
| ... | ... | @@ -1,50 +0,0 @@ |
| 1 | -'use strict'; | |
| 2 | - | |
| 3 | -Object.defineProperty(exports, "__esModule", { | |
| 4 | - value: true | |
| 5 | -}); | |
| 6 | - | |
| 7 | -var _createTester = require('./internal/createTester'); | |
| 8 | - | |
| 9 | -var _createTester2 = _interopRequireDefault(_createTester); | |
| 10 | - | |
| 11 | -var _doParallel = require('./internal/doParallel'); | |
| 12 | - | |
| 13 | -var _doParallel2 = _interopRequireDefault(_doParallel); | |
| 14 | - | |
| 15 | -var _notId = require('./internal/notId'); | |
| 16 | - | |
| 17 | -var _notId2 = _interopRequireDefault(_notId); | |
| 18 | - | |
| 19 | -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
| 20 | - | |
| 21 | -/** | |
| 22 | - * Returns `true` if every element in `coll` satisfies an async test. If any | |
| 23 | - * iteratee call returns `false`, the main `callback` is immediately called. | |
| 24 | - * | |
| 25 | - * @name every | |
| 26 | - * @static | |
| 27 | - * @memberOf module:Collections | |
| 28 | - * @method | |
| 29 | - * @alias all | |
| 30 | - * @category Collection | |
| 31 | - * @param {Array|Iterable|Object} coll - A collection to iterate over. | |
| 32 | - * @param {AsyncFunction} iteratee - An async truth test to apply to each item | |
| 33 | - * in the collection in parallel. | |
| 34 | - * The iteratee must complete with a boolean result value. | |
| 35 | - * Invoked with (item, callback). | |
| 36 | - * @param {Function} [callback] - A callback which is called after all the | |
| 37 | - * `iteratee` functions have finished. Result will be either `true` or `false` | |
| 38 | - * depending on the values of the async tests. Invoked with (err, result). | |
| 39 | - * @example | |
| 40 | - * | |
| 41 | - * async.every(['file1','file2','file3'], function(filePath, callback) { | |
| 42 | - * fs.access(filePath, function(err) { | |
| 43 | - * callback(null, !err) | |
| 44 | - * }); | |
| 45 | - * }, function(err, result) { | |
| 46 | - * // if result is true then every file exists | |
| 47 | - * }); | |
| 48 | - */ | |
| 49 | -exports.default = (0, _doParallel2.default)((0, _createTester2.default)(_notId2.default, _notId2.default)); | |
| 50 | -module.exports = exports['default']; | |
| 51 | 0 | \ No newline at end of file |
node_modules/async/allLimit.js
| ... | ... | @@ -1,42 +0,0 @@ |
| 1 | -'use strict'; | |
| 2 | - | |
| 3 | -Object.defineProperty(exports, "__esModule", { | |
| 4 | - value: true | |
| 5 | -}); | |
| 6 | - | |
| 7 | -var _createTester = require('./internal/createTester'); | |
| 8 | - | |
| 9 | -var _createTester2 = _interopRequireDefault(_createTester); | |
| 10 | - | |
| 11 | -var _doParallelLimit = require('./internal/doParallelLimit'); | |
| 12 | - | |
| 13 | -var _doParallelLimit2 = _interopRequireDefault(_doParallelLimit); | |
| 14 | - | |
| 15 | -var _notId = require('./internal/notId'); | |
| 16 | - | |
| 17 | -var _notId2 = _interopRequireDefault(_notId); | |
| 18 | - | |
| 19 | -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
| 20 | - | |
| 21 | -/** | |
| 22 | - * The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time. | |
| 23 | - * | |
| 24 | - * @name everyLimit | |
| 25 | - * @static | |
| 26 | - * @memberOf module:Collections | |
| 27 | - * @method | |
| 28 | - * @see [async.every]{@link module:Collections.every} | |
| 29 | - * @alias allLimit | |
| 30 | - * @category Collection | |
| 31 | - * @param {Array|Iterable|Object} coll - A collection to iterate over. | |
| 32 | - * @param {number} limit - The maximum number of async operations at a time. | |
| 33 | - * @param {AsyncFunction} iteratee - An async truth test to apply to each item | |
| 34 | - * in the collection in parallel. | |
| 35 | - * The iteratee must complete with a boolean result value. | |
| 36 | - * Invoked with (item, callback). | |
| 37 | - * @param {Function} [callback] - A callback which is called after all the | |
| 38 | - * `iteratee` functions have finished. Result will be either `true` or `false` | |
| 39 | - * depending on the values of the async tests. Invoked with (err, result). | |
| 40 | - */ | |
| 41 | -exports.default = (0, _doParallelLimit2.default)((0, _createTester2.default)(_notId2.default, _notId2.default)); | |
| 42 | -module.exports = exports['default']; | |
| 43 | 0 | \ No newline at end of file |
node_modules/async/allSeries.js
| ... | ... | @@ -1,37 +0,0 @@ |
| 1 | -'use strict'; | |
| 2 | - | |
| 3 | -Object.defineProperty(exports, "__esModule", { | |
| 4 | - value: true | |
| 5 | -}); | |
| 6 | - | |
| 7 | -var _everyLimit = require('./everyLimit'); | |
| 8 | - | |
| 9 | -var _everyLimit2 = _interopRequireDefault(_everyLimit); | |
| 10 | - | |
| 11 | -var _doLimit = require('./internal/doLimit'); | |
| 12 | - | |
| 13 | -var _doLimit2 = _interopRequireDefault(_doLimit); | |
| 14 | - | |
| 15 | -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
| 16 | - | |
| 17 | -/** | |
| 18 | - * The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time. | |
| 19 | - * | |
| 20 | - * @name everySeries | |
| 21 | - * @static | |
| 22 | - * @memberOf module:Collections | |
| 23 | - * @method | |
| 24 | - * @see [async.every]{@link module:Collections.every} | |
| 25 | - * @alias allSeries | |
| 26 | - * @category Collection | |
| 27 | - * @param {Array|Iterable|Object} coll - A collection to iterate over. | |
| 28 | - * @param {AsyncFunction} iteratee - An async truth test to apply to each item | |
| 29 | - * in the collection in series. | |
| 30 | - * The iteratee must complete with a boolean result value. | |
| 31 | - * Invoked with (item, callback). | |
| 32 | - * @param {Function} [callback] - A callback which is called after all the | |
| 33 | - * `iteratee` functions have finished. Result will be either `true` or `false` | |
| 34 | - * depending on the values of the async tests. Invoked with (err, result). | |
| 35 | - */ | |
| 36 | -exports.default = (0, _doLimit2.default)(_everyLimit2.default, 1); | |
| 37 | -module.exports = exports['default']; | |
| 38 | 0 | \ No newline at end of file |