graphql-tag
Advanced tools
Comparing version 0.1.17 to 1.0.0
# Change log | ||
### v1.0.0 | ||
Releasing 0.1.17 as 1.0.0 in order to be explicit about Semantic Versioning. | ||
### v0.1.17 | ||
@@ -4,0 +8,0 @@ |
21
index.js
@@ -64,21 +64,16 @@ var parse = require('./parser').parse; | ||
var literals = args[0]; | ||
args.shift(); | ||
var substitutions = args; | ||
var result = ''; | ||
// We always get literals[0] and then matching post literals for each arg given | ||
var result = literals[0]; | ||
// run the loop only for the substitution count | ||
for (var i = 0; i < substitutions.length; i++) { | ||
result += literals[i]; | ||
if (substitutions[i].kind && substitutions[i].kind === 'Document') { | ||
result += substitutions[i].loc.source.body; | ||
for (var i = 1; i < args.length; i++) { | ||
if (args[i].kind && args[i].kind === 'Document') { | ||
result += args[i].loc.source.body; | ||
} else { | ||
result += substitutions[i]; | ||
result += args[i]; | ||
} | ||
result += literals[i]; | ||
} | ||
// add the last literal | ||
result += literals[literals.length - 1]; | ||
return parseDocument(result); | ||
@@ -85,0 +80,0 @@ } |
{ | ||
"name": "graphql-tag", | ||
"version": "0.1.17", | ||
"version": "1.0.0", | ||
"description": "A JavaScript template literal tag that parses GraphQL queries", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
979
printer.js
@@ -60,6 +60,13 @@ module.exports = | ||
}); | ||
var _stringify = __webpack_require__(2); | ||
var _stringify2 = _interopRequireDefault(_stringify); | ||
exports.print = print; | ||
var _visitor = __webpack_require__(2); | ||
var _visitor = __webpack_require__(5); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
/** | ||
@@ -168,7 +175,7 @@ * Converts an AST into a string, using one set of reasonable | ||
var value = _ref10.value; | ||
return JSON.stringify(value); | ||
return (0, _stringify2.default)(value); | ||
}, | ||
BooleanValue: function BooleanValue(_ref11) { | ||
var value = _ref11.value; | ||
return JSON.stringify(value); | ||
return (0, _stringify2.default)(value); | ||
}, | ||
@@ -339,4 +346,27 @@ EnumValue: function EnumValue(_ref12) { | ||
/* 2 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
module.exports = { "default": __webpack_require__(3), __esModule: true }; | ||
/***/ }, | ||
/* 3 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
var core = __webpack_require__(4) | ||
, $JSON = core.JSON || (core.JSON = {stringify: JSON.stringify}); | ||
module.exports = function stringify(it){ // eslint-disable-line no-unused-vars | ||
return $JSON.stringify.apply($JSON, arguments); | ||
}; | ||
/***/ }, | ||
/* 4 */ | ||
/***/ function(module, exports) { | ||
var core = module.exports = {version: '2.4.0'}; | ||
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef | ||
/***/ }, | ||
/* 5 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
'use strict'; | ||
@@ -347,5 +377,18 @@ | ||
}); | ||
exports.BREAK = exports.QueryDocumentKeys = undefined; | ||
var _stringify = __webpack_require__(2); | ||
var _stringify2 = _interopRequireDefault(_stringify); | ||
var _slicedToArray2 = __webpack_require__(6); | ||
var _slicedToArray3 = _interopRequireDefault(_slicedToArray2); | ||
exports.visit = visit; | ||
exports.visitInParallel = visitInParallel; | ||
exports.visitWithTypeInfo = visitWithTypeInfo; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
/** | ||
@@ -533,4 +576,10 @@ * Copyright (c) 2015, Facebook, Inc. | ||
for (var ii = 0; ii < edits.length; ii++) { | ||
var editKey = edits[ii][0]; | ||
var editValue = edits[ii][1]; | ||
var _edits$ii = (0, _slicedToArray3.default)(edits[ii], 1); | ||
var editKey = _edits$ii[0]; | ||
var _edits$ii2 = (0, _slicedToArray3.default)(edits[ii], 2); | ||
var editValue = _edits$ii2[1]; | ||
if (inArray) { | ||
@@ -566,3 +615,3 @@ editKey -= editOffset; | ||
if (!isNode(node)) { | ||
throw new Error('Invalid AST Node: ' + JSON.stringify(node)); | ||
throw new Error('Invalid AST Node: ' + (0, _stringify2.default)(node)); | ||
} | ||
@@ -735,3 +784,921 @@ var visitFn = getVisitFn(visitor, node.kind, isLeaving); | ||
/***/ }, | ||
/* 6 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
exports.__esModule = true; | ||
var _isIterable2 = __webpack_require__(7); | ||
var _isIterable3 = _interopRequireDefault(_isIterable2); | ||
var _getIterator2 = __webpack_require__(58); | ||
var _getIterator3 = _interopRequireDefault(_getIterator2); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
exports.default = function () { | ||
function sliceIterator(arr, i) { | ||
var _arr = []; | ||
var _n = true; | ||
var _d = false; | ||
var _e = undefined; | ||
try { | ||
for (var _i = (0, _getIterator3.default)(arr), _s; !(_n = (_s = _i.next()).done); _n = true) { | ||
_arr.push(_s.value); | ||
if (i && _arr.length === i) break; | ||
} | ||
} catch (err) { | ||
_d = true; | ||
_e = err; | ||
} finally { | ||
try { | ||
if (!_n && _i["return"]) _i["return"](); | ||
} finally { | ||
if (_d) throw _e; | ||
} | ||
} | ||
return _arr; | ||
} | ||
return function (arr, i) { | ||
if (Array.isArray(arr)) { | ||
return arr; | ||
} else if ((0, _isIterable3.default)(Object(arr))) { | ||
return sliceIterator(arr, i); | ||
} else { | ||
throw new TypeError("Invalid attempt to destructure non-iterable instance"); | ||
} | ||
}; | ||
}(); | ||
/***/ }, | ||
/* 7 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
module.exports = { "default": __webpack_require__(8), __esModule: true }; | ||
/***/ }, | ||
/* 8 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
__webpack_require__(9); | ||
__webpack_require__(54); | ||
module.exports = __webpack_require__(56); | ||
/***/ }, | ||
/* 9 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
__webpack_require__(10); | ||
var global = __webpack_require__(21) | ||
, hide = __webpack_require__(24) | ||
, Iterators = __webpack_require__(13) | ||
, TO_STRING_TAG = __webpack_require__(51)('toStringTag'); | ||
for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){ | ||
var NAME = collections[i] | ||
, Collection = global[NAME] | ||
, proto = Collection && Collection.prototype; | ||
if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME); | ||
Iterators[NAME] = Iterators.Array; | ||
} | ||
/***/ }, | ||
/* 10 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
'use strict'; | ||
var addToUnscopables = __webpack_require__(11) | ||
, step = __webpack_require__(12) | ||
, Iterators = __webpack_require__(13) | ||
, toIObject = __webpack_require__(14); | ||
// 22.1.3.4 Array.prototype.entries() | ||
// 22.1.3.13 Array.prototype.keys() | ||
// 22.1.3.29 Array.prototype.values() | ||
// 22.1.3.30 Array.prototype[@@iterator]() | ||
module.exports = __webpack_require__(18)(Array, 'Array', function(iterated, kind){ | ||
this._t = toIObject(iterated); // target | ||
this._i = 0; // next index | ||
this._k = kind; // kind | ||
// 22.1.5.2.1 %ArrayIteratorPrototype%.next() | ||
}, function(){ | ||
var O = this._t | ||
, kind = this._k | ||
, index = this._i++; | ||
if(!O || index >= O.length){ | ||
this._t = undefined; | ||
return step(1); | ||
} | ||
if(kind == 'keys' )return step(0, index); | ||
if(kind == 'values')return step(0, O[index]); | ||
return step(0, [index, O[index]]); | ||
}, 'values'); | ||
// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) | ||
Iterators.Arguments = Iterators.Array; | ||
addToUnscopables('keys'); | ||
addToUnscopables('values'); | ||
addToUnscopables('entries'); | ||
/***/ }, | ||
/* 11 */ | ||
/***/ function(module, exports) { | ||
module.exports = function(){ /* empty */ }; | ||
/***/ }, | ||
/* 12 */ | ||
/***/ function(module, exports) { | ||
module.exports = function(done, value){ | ||
return {value: value, done: !!done}; | ||
}; | ||
/***/ }, | ||
/* 13 */ | ||
/***/ function(module, exports) { | ||
module.exports = {}; | ||
/***/ }, | ||
/* 14 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
// to indexed object, toObject with fallback for non-array-like ES3 strings | ||
var IObject = __webpack_require__(15) | ||
, defined = __webpack_require__(17); | ||
module.exports = function(it){ | ||
return IObject(defined(it)); | ||
}; | ||
/***/ }, | ||
/* 15 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
// fallback for non-array-like ES3 and non-enumerable old V8 strings | ||
var cof = __webpack_require__(16); | ||
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ | ||
return cof(it) == 'String' ? it.split('') : Object(it); | ||
}; | ||
/***/ }, | ||
/* 16 */ | ||
/***/ function(module, exports) { | ||
var toString = {}.toString; | ||
module.exports = function(it){ | ||
return toString.call(it).slice(8, -1); | ||
}; | ||
/***/ }, | ||
/* 17 */ | ||
/***/ function(module, exports) { | ||
// 7.2.1 RequireObjectCoercible(argument) | ||
module.exports = function(it){ | ||
if(it == undefined)throw TypeError("Can't call method on " + it); | ||
return it; | ||
}; | ||
/***/ }, | ||
/* 18 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
'use strict'; | ||
var LIBRARY = __webpack_require__(19) | ||
, $export = __webpack_require__(20) | ||
, redefine = __webpack_require__(34) | ||
, hide = __webpack_require__(24) | ||
, has = __webpack_require__(35) | ||
, Iterators = __webpack_require__(13) | ||
, $iterCreate = __webpack_require__(36) | ||
, setToStringTag = __webpack_require__(50) | ||
, getPrototypeOf = __webpack_require__(52) | ||
, ITERATOR = __webpack_require__(51)('iterator') | ||
, BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` | ||
, FF_ITERATOR = '@@iterator' | ||
, KEYS = 'keys' | ||
, VALUES = 'values'; | ||
var returnThis = function(){ return this; }; | ||
module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ | ||
$iterCreate(Constructor, NAME, next); | ||
var getMethod = function(kind){ | ||
if(!BUGGY && kind in proto)return proto[kind]; | ||
switch(kind){ | ||
case KEYS: return function keys(){ return new Constructor(this, kind); }; | ||
case VALUES: return function values(){ return new Constructor(this, kind); }; | ||
} return function entries(){ return new Constructor(this, kind); }; | ||
}; | ||
var TAG = NAME + ' Iterator' | ||
, DEF_VALUES = DEFAULT == VALUES | ||
, VALUES_BUG = false | ||
, proto = Base.prototype | ||
, $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] | ||
, $default = $native || getMethod(DEFAULT) | ||
, $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined | ||
, $anyNative = NAME == 'Array' ? proto.entries || $native : $native | ||
, methods, key, IteratorPrototype; | ||
// Fix native | ||
if($anyNative){ | ||
IteratorPrototype = getPrototypeOf($anyNative.call(new Base)); | ||
if(IteratorPrototype !== Object.prototype){ | ||
// Set @@toStringTag to native iterators | ||
setToStringTag(IteratorPrototype, TAG, true); | ||
// fix for some old engines | ||
if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); | ||
} | ||
} | ||
// fix Array#{values, @@iterator}.name in V8 / FF | ||
if(DEF_VALUES && $native && $native.name !== VALUES){ | ||
VALUES_BUG = true; | ||
$default = function values(){ return $native.call(this); }; | ||
} | ||
// Define iterator | ||
if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ | ||
hide(proto, ITERATOR, $default); | ||
} | ||
// Plug for library | ||
Iterators[NAME] = $default; | ||
Iterators[TAG] = returnThis; | ||
if(DEFAULT){ | ||
methods = { | ||
values: DEF_VALUES ? $default : getMethod(VALUES), | ||
keys: IS_SET ? $default : getMethod(KEYS), | ||
entries: $entries | ||
}; | ||
if(FORCED)for(key in methods){ | ||
if(!(key in proto))redefine(proto, key, methods[key]); | ||
} else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); | ||
} | ||
return methods; | ||
}; | ||
/***/ }, | ||
/* 19 */ | ||
/***/ function(module, exports) { | ||
module.exports = true; | ||
/***/ }, | ||
/* 20 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
var global = __webpack_require__(21) | ||
, core = __webpack_require__(4) | ||
, ctx = __webpack_require__(22) | ||
, hide = __webpack_require__(24) | ||
, PROTOTYPE = 'prototype'; | ||
var $export = function(type, name, source){ | ||
var IS_FORCED = type & $export.F | ||
, IS_GLOBAL = type & $export.G | ||
, IS_STATIC = type & $export.S | ||
, IS_PROTO = type & $export.P | ||
, IS_BIND = type & $export.B | ||
, IS_WRAP = type & $export.W | ||
, exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) | ||
, expProto = exports[PROTOTYPE] | ||
, target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] | ||
, key, own, out; | ||
if(IS_GLOBAL)source = name; | ||
for(key in source){ | ||
// contains in native | ||
own = !IS_FORCED && target && target[key] !== undefined; | ||
if(own && key in exports)continue; | ||
// export native or passed | ||
out = own ? target[key] : source[key]; | ||
// prevent global pollution for namespaces | ||
exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] | ||
// bind timers to global for call from export context | ||
: IS_BIND && own ? ctx(out, global) | ||
// wrap global constructors for prevent change them in library | ||
: IS_WRAP && target[key] == out ? (function(C){ | ||
var F = function(a, b, c){ | ||
if(this instanceof C){ | ||
switch(arguments.length){ | ||
case 0: return new C; | ||
case 1: return new C(a); | ||
case 2: return new C(a, b); | ||
} return new C(a, b, c); | ||
} return C.apply(this, arguments); | ||
}; | ||
F[PROTOTYPE] = C[PROTOTYPE]; | ||
return F; | ||
// make static versions for prototype methods | ||
})(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; | ||
// export proto methods to core.%CONSTRUCTOR%.methods.%NAME% | ||
if(IS_PROTO){ | ||
(exports.virtual || (exports.virtual = {}))[key] = out; | ||
// export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% | ||
if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out); | ||
} | ||
} | ||
}; | ||
// type bitmap | ||
$export.F = 1; // forced | ||
$export.G = 2; // global | ||
$export.S = 4; // static | ||
$export.P = 8; // proto | ||
$export.B = 16; // bind | ||
$export.W = 32; // wrap | ||
$export.U = 64; // safe | ||
$export.R = 128; // real proto method for `library` | ||
module.exports = $export; | ||
/***/ }, | ||
/* 21 */ | ||
/***/ function(module, exports) { | ||
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 | ||
var global = module.exports = typeof window != 'undefined' && window.Math == Math | ||
? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); | ||
if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef | ||
/***/ }, | ||
/* 22 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
// optional / simple context binding | ||
var aFunction = __webpack_require__(23); | ||
module.exports = function(fn, that, length){ | ||
aFunction(fn); | ||
if(that === undefined)return fn; | ||
switch(length){ | ||
case 1: return function(a){ | ||
return fn.call(that, a); | ||
}; | ||
case 2: return function(a, b){ | ||
return fn.call(that, a, b); | ||
}; | ||
case 3: return function(a, b, c){ | ||
return fn.call(that, a, b, c); | ||
}; | ||
} | ||
return function(/* ...args */){ | ||
return fn.apply(that, arguments); | ||
}; | ||
}; | ||
/***/ }, | ||
/* 23 */ | ||
/***/ function(module, exports) { | ||
module.exports = function(it){ | ||
if(typeof it != 'function')throw TypeError(it + ' is not a function!'); | ||
return it; | ||
}; | ||
/***/ }, | ||
/* 24 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
var dP = __webpack_require__(25) | ||
, createDesc = __webpack_require__(33); | ||
module.exports = __webpack_require__(29) ? function(object, key, value){ | ||
return dP.f(object, key, createDesc(1, value)); | ||
} : function(object, key, value){ | ||
object[key] = value; | ||
return object; | ||
}; | ||
/***/ }, | ||
/* 25 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
var anObject = __webpack_require__(26) | ||
, IE8_DOM_DEFINE = __webpack_require__(28) | ||
, toPrimitive = __webpack_require__(32) | ||
, dP = Object.defineProperty; | ||
exports.f = __webpack_require__(29) ? Object.defineProperty : function defineProperty(O, P, Attributes){ | ||
anObject(O); | ||
P = toPrimitive(P, true); | ||
anObject(Attributes); | ||
if(IE8_DOM_DEFINE)try { | ||
return dP(O, P, Attributes); | ||
} catch(e){ /* empty */ } | ||
if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); | ||
if('value' in Attributes)O[P] = Attributes.value; | ||
return O; | ||
}; | ||
/***/ }, | ||
/* 26 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
var isObject = __webpack_require__(27); | ||
module.exports = function(it){ | ||
if(!isObject(it))throw TypeError(it + ' is not an object!'); | ||
return it; | ||
}; | ||
/***/ }, | ||
/* 27 */ | ||
/***/ function(module, exports) { | ||
module.exports = function(it){ | ||
return typeof it === 'object' ? it !== null : typeof it === 'function'; | ||
}; | ||
/***/ }, | ||
/* 28 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
module.exports = !__webpack_require__(29) && !__webpack_require__(30)(function(){ | ||
return Object.defineProperty(__webpack_require__(31)('div'), 'a', {get: function(){ return 7; }}).a != 7; | ||
}); | ||
/***/ }, | ||
/* 29 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
// Thank's IE8 for his funny defineProperty | ||
module.exports = !__webpack_require__(30)(function(){ | ||
return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; | ||
}); | ||
/***/ }, | ||
/* 30 */ | ||
/***/ function(module, exports) { | ||
module.exports = function(exec){ | ||
try { | ||
return !!exec(); | ||
} catch(e){ | ||
return true; | ||
} | ||
}; | ||
/***/ }, | ||
/* 31 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
var isObject = __webpack_require__(27) | ||
, document = __webpack_require__(21).document | ||
// in old IE typeof document.createElement is 'object' | ||
, is = isObject(document) && isObject(document.createElement); | ||
module.exports = function(it){ | ||
return is ? document.createElement(it) : {}; | ||
}; | ||
/***/ }, | ||
/* 32 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
// 7.1.1 ToPrimitive(input [, PreferredType]) | ||
var isObject = __webpack_require__(27); | ||
// instead of the ES6 spec version, we didn't implement @@toPrimitive case | ||
// and the second argument - flag - preferred type is a string | ||
module.exports = function(it, S){ | ||
if(!isObject(it))return it; | ||
var fn, val; | ||
if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; | ||
if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val; | ||
if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; | ||
throw TypeError("Can't convert object to primitive value"); | ||
}; | ||
/***/ }, | ||
/* 33 */ | ||
/***/ function(module, exports) { | ||
module.exports = function(bitmap, value){ | ||
return { | ||
enumerable : !(bitmap & 1), | ||
configurable: !(bitmap & 2), | ||
writable : !(bitmap & 4), | ||
value : value | ||
}; | ||
}; | ||
/***/ }, | ||
/* 34 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
module.exports = __webpack_require__(24); | ||
/***/ }, | ||
/* 35 */ | ||
/***/ function(module, exports) { | ||
var hasOwnProperty = {}.hasOwnProperty; | ||
module.exports = function(it, key){ | ||
return hasOwnProperty.call(it, key); | ||
}; | ||
/***/ }, | ||
/* 36 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
'use strict'; | ||
var create = __webpack_require__(37) | ||
, descriptor = __webpack_require__(33) | ||
, setToStringTag = __webpack_require__(50) | ||
, IteratorPrototype = {}; | ||
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() | ||
__webpack_require__(24)(IteratorPrototype, __webpack_require__(51)('iterator'), function(){ return this; }); | ||
module.exports = function(Constructor, NAME, next){ | ||
Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)}); | ||
setToStringTag(Constructor, NAME + ' Iterator'); | ||
}; | ||
/***/ }, | ||
/* 37 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) | ||
var anObject = __webpack_require__(26) | ||
, dPs = __webpack_require__(38) | ||
, enumBugKeys = __webpack_require__(48) | ||
, IE_PROTO = __webpack_require__(45)('IE_PROTO') | ||
, Empty = function(){ /* empty */ } | ||
, PROTOTYPE = 'prototype'; | ||
// Create object with fake `null` prototype: use iframe Object with cleared prototype | ||
var createDict = function(){ | ||
// Thrash, waste and sodomy: IE GC bug | ||
var iframe = __webpack_require__(31)('iframe') | ||
, i = enumBugKeys.length | ||
, gt = '>' | ||
, iframeDocument; | ||
iframe.style.display = 'none'; | ||
__webpack_require__(49).appendChild(iframe); | ||
iframe.src = 'javascript:'; // eslint-disable-line no-script-url | ||
// createDict = iframe.contentWindow.Object; | ||
// html.removeChild(iframe); | ||
iframeDocument = iframe.contentWindow.document; | ||
iframeDocument.open(); | ||
iframeDocument.write('<script>document.F=Object</script' + gt); | ||
iframeDocument.close(); | ||
createDict = iframeDocument.F; | ||
while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]]; | ||
return createDict(); | ||
}; | ||
module.exports = Object.create || function create(O, Properties){ | ||
var result; | ||
if(O !== null){ | ||
Empty[PROTOTYPE] = anObject(O); | ||
result = new Empty; | ||
Empty[PROTOTYPE] = null; | ||
// add "__proto__" for Object.getPrototypeOf polyfill | ||
result[IE_PROTO] = O; | ||
} else result = createDict(); | ||
return Properties === undefined ? result : dPs(result, Properties); | ||
}; | ||
/***/ }, | ||
/* 38 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
var dP = __webpack_require__(25) | ||
, anObject = __webpack_require__(26) | ||
, getKeys = __webpack_require__(39); | ||
module.exports = __webpack_require__(29) ? Object.defineProperties : function defineProperties(O, Properties){ | ||
anObject(O); | ||
var keys = getKeys(Properties) | ||
, length = keys.length | ||
, i = 0 | ||
, P; | ||
while(length > i)dP.f(O, P = keys[i++], Properties[P]); | ||
return O; | ||
}; | ||
/***/ }, | ||
/* 39 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
// 19.1.2.14 / 15.2.3.14 Object.keys(O) | ||
var $keys = __webpack_require__(40) | ||
, enumBugKeys = __webpack_require__(48); | ||
module.exports = Object.keys || function keys(O){ | ||
return $keys(O, enumBugKeys); | ||
}; | ||
/***/ }, | ||
/* 40 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
var has = __webpack_require__(35) | ||
, toIObject = __webpack_require__(14) | ||
, arrayIndexOf = __webpack_require__(41)(false) | ||
, IE_PROTO = __webpack_require__(45)('IE_PROTO'); | ||
module.exports = function(object, names){ | ||
var O = toIObject(object) | ||
, i = 0 | ||
, result = [] | ||
, key; | ||
for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); | ||
// Don't enum bug & hidden keys | ||
while(names.length > i)if(has(O, key = names[i++])){ | ||
~arrayIndexOf(result, key) || result.push(key); | ||
} | ||
return result; | ||
}; | ||
/***/ }, | ||
/* 41 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
// false -> Array#indexOf | ||
// true -> Array#includes | ||
var toIObject = __webpack_require__(14) | ||
, toLength = __webpack_require__(42) | ||
, toIndex = __webpack_require__(44); | ||
module.exports = function(IS_INCLUDES){ | ||
return function($this, el, fromIndex){ | ||
var O = toIObject($this) | ||
, length = toLength(O.length) | ||
, index = toIndex(fromIndex, length) | ||
, value; | ||
// Array#includes uses SameValueZero equality algorithm | ||
if(IS_INCLUDES && el != el)while(length > index){ | ||
value = O[index++]; | ||
if(value != value)return true; | ||
// Array#toIndex ignores holes, Array#includes - not | ||
} else for(;length > index; index++)if(IS_INCLUDES || index in O){ | ||
if(O[index] === el)return IS_INCLUDES || index || 0; | ||
} return !IS_INCLUDES && -1; | ||
}; | ||
}; | ||
/***/ }, | ||
/* 42 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
// 7.1.15 ToLength | ||
var toInteger = __webpack_require__(43) | ||
, min = Math.min; | ||
module.exports = function(it){ | ||
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 | ||
}; | ||
/***/ }, | ||
/* 43 */ | ||
/***/ function(module, exports) { | ||
// 7.1.4 ToInteger | ||
var ceil = Math.ceil | ||
, floor = Math.floor; | ||
module.exports = function(it){ | ||
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); | ||
}; | ||
/***/ }, | ||
/* 44 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
var toInteger = __webpack_require__(43) | ||
, max = Math.max | ||
, min = Math.min; | ||
module.exports = function(index, length){ | ||
index = toInteger(index); | ||
return index < 0 ? max(index + length, 0) : min(index, length); | ||
}; | ||
/***/ }, | ||
/* 45 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
var shared = __webpack_require__(46)('keys') | ||
, uid = __webpack_require__(47); | ||
module.exports = function(key){ | ||
return shared[key] || (shared[key] = uid(key)); | ||
}; | ||
/***/ }, | ||
/* 46 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
var global = __webpack_require__(21) | ||
, SHARED = '__core-js_shared__' | ||
, store = global[SHARED] || (global[SHARED] = {}); | ||
module.exports = function(key){ | ||
return store[key] || (store[key] = {}); | ||
}; | ||
/***/ }, | ||
/* 47 */ | ||
/***/ function(module, exports) { | ||
var id = 0 | ||
, px = Math.random(); | ||
module.exports = function(key){ | ||
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); | ||
}; | ||
/***/ }, | ||
/* 48 */ | ||
/***/ function(module, exports) { | ||
// IE 8- don't enum bug keys | ||
module.exports = ( | ||
'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' | ||
).split(','); | ||
/***/ }, | ||
/* 49 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
module.exports = __webpack_require__(21).document && document.documentElement; | ||
/***/ }, | ||
/* 50 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
var def = __webpack_require__(25).f | ||
, has = __webpack_require__(35) | ||
, TAG = __webpack_require__(51)('toStringTag'); | ||
module.exports = function(it, tag, stat){ | ||
if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); | ||
}; | ||
/***/ }, | ||
/* 51 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
var store = __webpack_require__(46)('wks') | ||
, uid = __webpack_require__(47) | ||
, Symbol = __webpack_require__(21).Symbol | ||
, USE_SYMBOL = typeof Symbol == 'function'; | ||
var $exports = module.exports = function(name){ | ||
return store[name] || (store[name] = | ||
USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); | ||
}; | ||
$exports.store = store; | ||
/***/ }, | ||
/* 52 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) | ||
var has = __webpack_require__(35) | ||
, toObject = __webpack_require__(53) | ||
, IE_PROTO = __webpack_require__(45)('IE_PROTO') | ||
, ObjectProto = Object.prototype; | ||
module.exports = Object.getPrototypeOf || function(O){ | ||
O = toObject(O); | ||
if(has(O, IE_PROTO))return O[IE_PROTO]; | ||
if(typeof O.constructor == 'function' && O instanceof O.constructor){ | ||
return O.constructor.prototype; | ||
} return O instanceof Object ? ObjectProto : null; | ||
}; | ||
/***/ }, | ||
/* 53 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
// 7.1.13 ToObject(argument) | ||
var defined = __webpack_require__(17); | ||
module.exports = function(it){ | ||
return Object(defined(it)); | ||
}; | ||
/***/ }, | ||
/* 54 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
'use strict'; | ||
var $at = __webpack_require__(55)(true); | ||
// 21.1.3.27 String.prototype[@@iterator]() | ||
__webpack_require__(18)(String, 'String', function(iterated){ | ||
this._t = String(iterated); // target | ||
this._i = 0; // next index | ||
// 21.1.5.2.1 %StringIteratorPrototype%.next() | ||
}, function(){ | ||
var O = this._t | ||
, index = this._i | ||
, point; | ||
if(index >= O.length)return {value: undefined, done: true}; | ||
point = $at(O, index); | ||
this._i += point.length; | ||
return {value: point, done: false}; | ||
}); | ||
/***/ }, | ||
/* 55 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
var toInteger = __webpack_require__(43) | ||
, defined = __webpack_require__(17); | ||
// true -> String#at | ||
// false -> String#codePointAt | ||
module.exports = function(TO_STRING){ | ||
return function(that, pos){ | ||
var s = String(defined(that)) | ||
, i = toInteger(pos) | ||
, l = s.length | ||
, a, b; | ||
if(i < 0 || i >= l)return TO_STRING ? '' : undefined; | ||
a = s.charCodeAt(i); | ||
return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff | ||
? TO_STRING ? s.charAt(i) : a | ||
: TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; | ||
}; | ||
}; | ||
/***/ }, | ||
/* 56 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
var classof = __webpack_require__(57) | ||
, ITERATOR = __webpack_require__(51)('iterator') | ||
, Iterators = __webpack_require__(13); | ||
module.exports = __webpack_require__(4).isIterable = function(it){ | ||
var O = Object(it); | ||
return O[ITERATOR] !== undefined | ||
|| '@@iterator' in O | ||
|| Iterators.hasOwnProperty(classof(O)); | ||
}; | ||
/***/ }, | ||
/* 57 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
// getting tag from 19.1.3.6 Object.prototype.toString() | ||
var cof = __webpack_require__(16) | ||
, TAG = __webpack_require__(51)('toStringTag') | ||
// ES3 wrong here | ||
, ARG = cof(function(){ return arguments; }()) == 'Arguments'; | ||
// fallback for IE11 Script Access Denied error | ||
var tryGet = function(it, key){ | ||
try { | ||
return it[key]; | ||
} catch(e){ /* empty */ } | ||
}; | ||
module.exports = function(it){ | ||
var O, T, B; | ||
return it === undefined ? 'Undefined' : it === null ? 'Null' | ||
// @@toStringTag case | ||
: typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T | ||
// builtinTag case | ||
: ARG ? cof(O) | ||
// ES3 arguments fallback | ||
: (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; | ||
}; | ||
/***/ }, | ||
/* 58 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
module.exports = { "default": __webpack_require__(59), __esModule: true }; | ||
/***/ }, | ||
/* 59 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
__webpack_require__(9); | ||
__webpack_require__(54); | ||
module.exports = __webpack_require__(60); | ||
/***/ }, | ||
/* 60 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
var anObject = __webpack_require__(26) | ||
, get = __webpack_require__(61); | ||
module.exports = __webpack_require__(4).getIterator = function(it){ | ||
var iterFn = get(it); | ||
if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!'); | ||
return anObject(iterFn.call(it)); | ||
}; | ||
/***/ }, | ||
/* 61 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
var classof = __webpack_require__(57) | ||
, ITERATOR = __webpack_require__(51)('iterator') | ||
, Iterators = __webpack_require__(13); | ||
module.exports = __webpack_require__(4).getIteratorMethod = function(it){ | ||
if(it != undefined)return it[ITERATOR] | ||
|| it['@@iterator'] | ||
|| Iterators[classof(it)]; | ||
}; | ||
/***/ } | ||
/******/ ]); |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
187264
5315
0
0