Initial commit
This commit is contained in:
21
node_modules/is-accessor-descriptor/LICENSE
generated
vendored
Normal file
21
node_modules/is-accessor-descriptor/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015-2017, Jon Schlinkert.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
69
node_modules/is-accessor-descriptor/index.js
generated
vendored
Normal file
69
node_modules/is-accessor-descriptor/index.js
generated
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
/*!
|
||||
* is-accessor-descriptor <https://github.com/jonschlinkert/is-accessor-descriptor>
|
||||
*
|
||||
* Copyright (c) 2015-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var typeOf = require('kind-of');
|
||||
|
||||
// accessor descriptor properties
|
||||
var accessor = {
|
||||
get: 'function',
|
||||
set: 'function',
|
||||
configurable: 'boolean',
|
||||
enumerable: 'boolean'
|
||||
};
|
||||
|
||||
function isAccessorDescriptor(obj, prop) {
|
||||
if (typeof prop === 'string') {
|
||||
var val = Object.getOwnPropertyDescriptor(obj, prop);
|
||||
return typeof val !== 'undefined';
|
||||
}
|
||||
|
||||
if (typeOf(obj) !== 'object') {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (has(obj, 'value') || has(obj, 'writable')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!has(obj, 'get') || typeof obj.get !== 'function') {
|
||||
return false;
|
||||
}
|
||||
|
||||
// tldr: it's valid to have "set" be undefined
|
||||
// "set" might be undefined if `Object.getOwnPropertyDescriptor`
|
||||
// was used to get the value, and only `get` was defined by the user
|
||||
if (has(obj, 'set') && typeof obj[key] !== 'function' && typeof obj[key] !== 'undefined') {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (var key in obj) {
|
||||
if (!accessor.hasOwnProperty(key)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (typeOf(obj[key]) === accessor[key]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (typeof obj[key] !== 'undefined') {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function has(obj, key) {
|
||||
return {}.hasOwnProperty.call(obj, key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Expose `isAccessorDescriptor`
|
||||
*/
|
||||
|
||||
module.exports = isAccessorDescriptor;
|
||||
21
node_modules/is-accessor-descriptor/node_modules/kind-of/LICENSE
generated
vendored
Normal file
21
node_modules/is-accessor-descriptor/node_modules/kind-of/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
129
node_modules/is-accessor-descriptor/node_modules/kind-of/index.js
generated
vendored
Normal file
129
node_modules/is-accessor-descriptor/node_modules/kind-of/index.js
generated
vendored
Normal file
@@ -0,0 +1,129 @@
|
||||
var toString = Object.prototype.toString;
|
||||
|
||||
module.exports = function kindOf(val) {
|
||||
if (val === void 0) return 'undefined';
|
||||
if (val === null) return 'null';
|
||||
|
||||
var type = typeof val;
|
||||
if (type === 'boolean') return 'boolean';
|
||||
if (type === 'string') return 'string';
|
||||
if (type === 'number') return 'number';
|
||||
if (type === 'symbol') return 'symbol';
|
||||
if (type === 'function') {
|
||||
return isGeneratorFn(val) ? 'generatorfunction' : 'function';
|
||||
}
|
||||
|
||||
if (isArray(val)) return 'array';
|
||||
if (isBuffer(val)) return 'buffer';
|
||||
if (isArguments(val)) return 'arguments';
|
||||
if (isDate(val)) return 'date';
|
||||
if (isError(val)) return 'error';
|
||||
if (isRegexp(val)) return 'regexp';
|
||||
|
||||
switch (ctorName(val)) {
|
||||
case 'Symbol': return 'symbol';
|
||||
case 'Promise': return 'promise';
|
||||
|
||||
// Set, Map, WeakSet, WeakMap
|
||||
case 'WeakMap': return 'weakmap';
|
||||
case 'WeakSet': return 'weakset';
|
||||
case 'Map': return 'map';
|
||||
case 'Set': return 'set';
|
||||
|
||||
// 8-bit typed arrays
|
||||
case 'Int8Array': return 'int8array';
|
||||
case 'Uint8Array': return 'uint8array';
|
||||
case 'Uint8ClampedArray': return 'uint8clampedarray';
|
||||
|
||||
// 16-bit typed arrays
|
||||
case 'Int16Array': return 'int16array';
|
||||
case 'Uint16Array': return 'uint16array';
|
||||
|
||||
// 32-bit typed arrays
|
||||
case 'Int32Array': return 'int32array';
|
||||
case 'Uint32Array': return 'uint32array';
|
||||
case 'Float32Array': return 'float32array';
|
||||
case 'Float64Array': return 'float64array';
|
||||
}
|
||||
|
||||
if (isGeneratorObj(val)) {
|
||||
return 'generator';
|
||||
}
|
||||
|
||||
// Non-plain objects
|
||||
type = toString.call(val);
|
||||
switch (type) {
|
||||
case '[object Object]': return 'object';
|
||||
// iterators
|
||||
case '[object Map Iterator]': return 'mapiterator';
|
||||
case '[object Set Iterator]': return 'setiterator';
|
||||
case '[object String Iterator]': return 'stringiterator';
|
||||
case '[object Array Iterator]': return 'arrayiterator';
|
||||
}
|
||||
|
||||
// other
|
||||
return type.slice(8, -1).toLowerCase().replace(/\s/g, '');
|
||||
};
|
||||
|
||||
function ctorName(val) {
|
||||
return val.constructor ? val.constructor.name : null;
|
||||
}
|
||||
|
||||
function isArray(val) {
|
||||
if (Array.isArray) return Array.isArray(val);
|
||||
return val instanceof Array;
|
||||
}
|
||||
|
||||
function isError(val) {
|
||||
return val instanceof Error || (typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number');
|
||||
}
|
||||
|
||||
function isDate(val) {
|
||||
if (val instanceof Date) return true;
|
||||
return typeof val.toDateString === 'function'
|
||||
&& typeof val.getDate === 'function'
|
||||
&& typeof val.setDate === 'function';
|
||||
}
|
||||
|
||||
function isRegexp(val) {
|
||||
if (val instanceof RegExp) return true;
|
||||
return typeof val.flags === 'string'
|
||||
&& typeof val.ignoreCase === 'boolean'
|
||||
&& typeof val.multiline === 'boolean'
|
||||
&& typeof val.global === 'boolean';
|
||||
}
|
||||
|
||||
function isGeneratorFn(name, val) {
|
||||
return ctorName(name) === 'GeneratorFunction';
|
||||
}
|
||||
|
||||
function isGeneratorObj(val) {
|
||||
return typeof val.throw === 'function'
|
||||
&& typeof val.return === 'function'
|
||||
&& typeof val.next === 'function';
|
||||
}
|
||||
|
||||
function isArguments(val) {
|
||||
try {
|
||||
if (typeof val.length === 'number' && typeof val.callee === 'function') {
|
||||
return true;
|
||||
}
|
||||
} catch (err) {
|
||||
if (err.message.indexOf('callee') !== -1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* If you need to support Safari 5-7 (8-10 yr-old browser),
|
||||
* take a look at https://github.com/feross/is-buffer
|
||||
*/
|
||||
|
||||
function isBuffer(val) {
|
||||
if (val.constructor && typeof val.constructor.isBuffer === 'function') {
|
||||
return val.constructor.isBuffer(val);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
48
node_modules/is-accessor-descriptor/node_modules/kind-of/package.json
generated
vendored
Normal file
48
node_modules/is-accessor-descriptor/node_modules/kind-of/package.json
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"name": "kind-of",
|
||||
"description": "Get the native type of a value.",
|
||||
"version": "6.0.2",
|
||||
"homepage": "https://github.com/jonschlinkert/kind-of",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"repository": "jonschlinkert/kind-of",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"benchmarked": "^2.0.0",
|
||||
"browserify": "^14.4.0",
|
||||
"gulp-format-md": "^1.0.0",
|
||||
"mocha": "^4.0.1",
|
||||
"write": "^1.0.3"
|
||||
},
|
||||
"verb": {
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
},
|
||||
"related": {
|
||||
"list": [
|
||||
"is-glob",
|
||||
"is-number",
|
||||
"is-primitive"
|
||||
]
|
||||
},
|
||||
"reflinks": [
|
||||
"type-of",
|
||||
"typeof",
|
||||
"verb"
|
||||
]
|
||||
}
|
||||
}
|
||||
45
node_modules/is-accessor-descriptor/package.json
generated
vendored
Normal file
45
node_modules/is-accessor-descriptor/package.json
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"name": "is-accessor-descriptor",
|
||||
"description": "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.",
|
||||
"version": "1.0.0",
|
||||
"homepage": "https://github.com/jonschlinkert/is-accessor-descriptor",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"repository": "jonschlinkert/is-accessor-descriptor",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"kind-of": "^6.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"gulp-format-md": "^1.0.0",
|
||||
"mocha": "^3.5.3"
|
||||
},
|
||||
"verb": {
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"is-accessor-descriptor",
|
||||
"is-data-descriptor",
|
||||
"is-descriptor",
|
||||
"is-plain-object",
|
||||
"isobject"
|
||||
]
|
||||
},
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user