@locker/shared
Advanced tools
Comparing version 0.14.15 to 0.14.16
@@ -43,11 +43,6 @@ /*! | ||
function ArrayConcat(arr) { | ||
function ArrayConcat(arr, ...args) { | ||
// Reimplement Array#concat to avoid prototype poisoning from Symbol.isConcatSpreadable. | ||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/isConcatSpreadable | ||
const result = ReflectApply(ArrayProtoSlice, arr, [0]); | ||
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
args[_key - 1] = arguments[_key]; | ||
} | ||
const { | ||
@@ -73,15 +68,7 @@ length | ||
function ArrayIndexOf(arr) { | ||
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { | ||
args[_key2 - 1] = arguments[_key2]; | ||
} | ||
function ArrayIndexOf(arr, ...args) { | ||
return ReflectApply(ArrayProtoIndexOf, arr, args); | ||
} | ||
function ArrayJoin(arr) { | ||
for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { | ||
args[_key3 - 1] = arguments[_key3]; | ||
} | ||
function ArrayJoin(arr, ...args) { | ||
return ReflectApply(ArrayProtoJoin, arr, args); | ||
@@ -94,7 +81,3 @@ } | ||
function ArrayPush(arr) { | ||
for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) { | ||
args[_key4 - 1] = arguments[_key4]; | ||
} | ||
function ArrayPush(arr, ...args) { | ||
return ReflectApply(ArrayProtoPush, arr, args); | ||
@@ -107,7 +90,3 @@ } | ||
function ArraySlice(arr) { | ||
for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) { | ||
args[_key5 - 1] = arguments[_key5]; | ||
} | ||
function ArraySlice(arr, ...args) { | ||
return ReflectApply(ArrayProtoSlice, arr, args); | ||
@@ -121,2 +100,17 @@ } | ||
const { | ||
now: DateNow | ||
} = Date; | ||
const { | ||
bind: FunctionProtoBind | ||
} = Function.prototype; | ||
const FunctionBind = (func, thisArg) => ReflectApply(FunctionProtoBind, func, [thisArg]); | ||
function wrap(func, wrapper) { | ||
return function wrapped(...args) { | ||
return ReflectApply(wrapper, this, [func, args]); | ||
}; | ||
} | ||
const { | ||
create: ObjectCreate$1 | ||
@@ -165,2 +159,4 @@ } = Object; | ||
const getTimestamp = typeof performance === 'undefined' ? DateNow : FunctionBind(performance.now, performance); | ||
function toBoolean(value) { | ||
@@ -263,18 +259,2 @@ return !!value; | ||
const { | ||
bind: FunctionProtoBind | ||
} = Function.prototype; | ||
const FunctionBind = (func, thisArg) => ReflectApply(FunctionProtoBind, func, [thisArg]); | ||
function wrap(func, wrapper) { | ||
return function wrapped() { | ||
for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) { | ||
args[_key6] = arguments[_key6]; | ||
} | ||
return ReflectApply(wrapper, this, [func, args]); | ||
}; | ||
} | ||
const { | ||
parse: JSONParse, | ||
@@ -330,4 +310,6 @@ stringify: JSONStringify | ||
const { | ||
clear: MapProtoClear, | ||
entries: MapProtoEntries, | ||
forEach: MapProtoForEach, | ||
get: MapProtoGet, | ||
set: MapProtoSet | ||
@@ -337,2 +319,6 @@ } = Map.prototype; | ||
function MapClear(map) { | ||
return ReflectApply(MapProtoClear, map, []); | ||
} | ||
function MapEntries(map) { | ||
@@ -346,2 +332,6 @@ return ReflectApply(MapProtoEntries, map, emptyArray); | ||
function MapGet(map, key) { | ||
return ReflectApply(MapProtoGet, map, [key]); | ||
} | ||
function MapSet(map, key, value) { | ||
@@ -356,7 +346,3 @@ return ReflectApply(MapProtoSet, map, [key, value]); | ||
function PromiseThen(promise) { | ||
for (var _len7 = arguments.length, args = new Array(_len7 > 1 ? _len7 - 1 : 0), _key7 = 1; _key7 < _len7; _key7++) { | ||
args[_key7 - 1] = arguments[_key7]; | ||
} | ||
function PromiseThen(promise, ...args) { | ||
return ReflectApply(PromiseProtoThen, promise, [args]); | ||
@@ -383,7 +369,3 @@ } | ||
function StringIncludes(str) { | ||
for (var _len8 = arguments.length, args = new Array(_len8 > 1 ? _len8 - 1 : 0), _key8 = 1; _key8 < _len8; _key8++) { | ||
args[_key8 - 1] = arguments[_key8]; | ||
} | ||
function StringIncludes(str, ...args) { | ||
return ReflectApply(StringProtoIncludes, str, args); | ||
@@ -400,31 +382,15 @@ } | ||
function StringSlice(str) { | ||
for (var _len9 = arguments.length, args = new Array(_len9 > 1 ? _len9 - 1 : 0), _key9 = 1; _key9 < _len9; _key9++) { | ||
args[_key9 - 1] = arguments[_key9]; | ||
} | ||
function StringSlice(str, ...args) { | ||
return ReflectApply(StringProtoSlice, str, args); | ||
} | ||
function StringSplit(str) { | ||
for (var _len10 = arguments.length, args = new Array(_len10 > 1 ? _len10 - 1 : 0), _key10 = 1; _key10 < _len10; _key10++) { | ||
args[_key10 - 1] = arguments[_key10]; | ||
} | ||
function StringSplit(str, ...args) { | ||
return ReflectApply(StringProtoSplit, str, args); | ||
} | ||
function StringSubstring(str) { | ||
for (var _len11 = arguments.length, args = new Array(_len11 > 1 ? _len11 - 1 : 0), _key11 = 1; _key11 < _len11; _key11++) { | ||
args[_key11 - 1] = arguments[_key11]; | ||
} | ||
function StringSubstring(str, ...args) { | ||
return ReflectApply(StringProtoSubstring, str, args); | ||
} | ||
function StringStartsWith(str) { | ||
for (var _len12 = arguments.length, args = new Array(_len12 > 1 ? _len12 - 1 : 0), _key12 = 1; _key12 < _len12; _key12++) { | ||
args[_key12 - 1] = arguments[_key12]; | ||
} | ||
function StringStartsWith(str, ...args) { | ||
return ReflectApply(StringProtoStartsWith, str, args); | ||
@@ -535,2 +501,3 @@ } | ||
exports.ArraySome = ArraySome; | ||
exports.DateNow = DateNow; | ||
exports.ErrorCtor = ErrorCtor; | ||
@@ -544,5 +511,7 @@ exports.FunctionBind = FunctionBind; | ||
exports.MAGIC_OBJECT_SYMBOL = MAGIC_OBJECT_SYMBOL; | ||
exports.MapClear = MapClear; | ||
exports.MapCtor = MapCtor; | ||
exports.MapEntries = MapEntries; | ||
exports.MapForEach = MapForEach; | ||
exports.MapGet = MapGet; | ||
exports.MapSet = MapSet; | ||
@@ -610,2 +579,3 @@ exports.MathMin = MathMin; | ||
exports.escapeRegExp = escapeRegExp; | ||
exports.getTimestamp = getTimestamp; | ||
exports.isLiveObject = isLiveObject; | ||
@@ -626,2 +596,2 @@ exports.isMagicObject = isMagicObject; | ||
exports.wrap = wrap; | ||
/*! version: 0.14.15 */ | ||
/*! version: 0.14.16 */ |
@@ -38,11 +38,6 @@ /*! | ||
function ArrayConcat(arr) { | ||
function ArrayConcat(arr, ...args) { | ||
// Reimplement Array#concat to avoid prototype poisoning from Symbol.isConcatSpreadable. | ||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/isConcatSpreadable | ||
const result = ReflectApply(ArrayProtoSlice, arr, [0]); | ||
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
args[_key - 1] = arguments[_key]; | ||
} | ||
const { | ||
@@ -68,15 +63,7 @@ length | ||
function ArrayIndexOf(arr) { | ||
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { | ||
args[_key2 - 1] = arguments[_key2]; | ||
} | ||
function ArrayIndexOf(arr, ...args) { | ||
return ReflectApply(ArrayProtoIndexOf, arr, args); | ||
} | ||
function ArrayJoin(arr) { | ||
for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { | ||
args[_key3 - 1] = arguments[_key3]; | ||
} | ||
function ArrayJoin(arr, ...args) { | ||
return ReflectApply(ArrayProtoJoin, arr, args); | ||
@@ -89,7 +76,3 @@ } | ||
function ArrayPush(arr) { | ||
for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) { | ||
args[_key4 - 1] = arguments[_key4]; | ||
} | ||
function ArrayPush(arr, ...args) { | ||
return ReflectApply(ArrayProtoPush, arr, args); | ||
@@ -102,7 +85,3 @@ } | ||
function ArraySlice(arr) { | ||
for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) { | ||
args[_key5 - 1] = arguments[_key5]; | ||
} | ||
function ArraySlice(arr, ...args) { | ||
return ReflectApply(ArrayProtoSlice, arr, args); | ||
@@ -116,2 +95,17 @@ } | ||
const { | ||
now: DateNow | ||
} = Date; | ||
const { | ||
bind: FunctionProtoBind | ||
} = Function.prototype; | ||
const FunctionBind = (func, thisArg) => ReflectApply(FunctionProtoBind, func, [thisArg]); | ||
function wrap(func, wrapper) { | ||
return function wrapped(...args) { | ||
return ReflectApply(wrapper, this, [func, args]); | ||
}; | ||
} | ||
const { | ||
create: ObjectCreate$1 | ||
@@ -160,2 +154,4 @@ } = Object; | ||
const getTimestamp = typeof performance === 'undefined' ? DateNow : FunctionBind(performance.now, performance); | ||
function toBoolean(value) { | ||
@@ -258,18 +254,2 @@ return !!value; | ||
const { | ||
bind: FunctionProtoBind | ||
} = Function.prototype; | ||
const FunctionBind = (func, thisArg) => ReflectApply(FunctionProtoBind, func, [thisArg]); | ||
function wrap(func, wrapper) { | ||
return function wrapped() { | ||
for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) { | ||
args[_key6] = arguments[_key6]; | ||
} | ||
return ReflectApply(wrapper, this, [func, args]); | ||
}; | ||
} | ||
const { | ||
parse: JSONParse, | ||
@@ -325,4 +305,6 @@ stringify: JSONStringify | ||
const { | ||
clear: MapProtoClear, | ||
entries: MapProtoEntries, | ||
forEach: MapProtoForEach, | ||
get: MapProtoGet, | ||
set: MapProtoSet | ||
@@ -332,2 +314,6 @@ } = Map.prototype; | ||
function MapClear(map) { | ||
return ReflectApply(MapProtoClear, map, []); | ||
} | ||
function MapEntries(map) { | ||
@@ -341,2 +327,6 @@ return ReflectApply(MapProtoEntries, map, emptyArray); | ||
function MapGet(map, key) { | ||
return ReflectApply(MapProtoGet, map, [key]); | ||
} | ||
function MapSet(map, key, value) { | ||
@@ -351,7 +341,3 @@ return ReflectApply(MapProtoSet, map, [key, value]); | ||
function PromiseThen(promise) { | ||
for (var _len7 = arguments.length, args = new Array(_len7 > 1 ? _len7 - 1 : 0), _key7 = 1; _key7 < _len7; _key7++) { | ||
args[_key7 - 1] = arguments[_key7]; | ||
} | ||
function PromiseThen(promise, ...args) { | ||
return ReflectApply(PromiseProtoThen, promise, [args]); | ||
@@ -378,7 +364,3 @@ } | ||
function StringIncludes(str) { | ||
for (var _len8 = arguments.length, args = new Array(_len8 > 1 ? _len8 - 1 : 0), _key8 = 1; _key8 < _len8; _key8++) { | ||
args[_key8 - 1] = arguments[_key8]; | ||
} | ||
function StringIncludes(str, ...args) { | ||
return ReflectApply(StringProtoIncludes, str, args); | ||
@@ -395,31 +377,15 @@ } | ||
function StringSlice(str) { | ||
for (var _len9 = arguments.length, args = new Array(_len9 > 1 ? _len9 - 1 : 0), _key9 = 1; _key9 < _len9; _key9++) { | ||
args[_key9 - 1] = arguments[_key9]; | ||
} | ||
function StringSlice(str, ...args) { | ||
return ReflectApply(StringProtoSlice, str, args); | ||
} | ||
function StringSplit(str) { | ||
for (var _len10 = arguments.length, args = new Array(_len10 > 1 ? _len10 - 1 : 0), _key10 = 1; _key10 < _len10; _key10++) { | ||
args[_key10 - 1] = arguments[_key10]; | ||
} | ||
function StringSplit(str, ...args) { | ||
return ReflectApply(StringProtoSplit, str, args); | ||
} | ||
function StringSubstring(str) { | ||
for (var _len11 = arguments.length, args = new Array(_len11 > 1 ? _len11 - 1 : 0), _key11 = 1; _key11 < _len11; _key11++) { | ||
args[_key11 - 1] = arguments[_key11]; | ||
} | ||
function StringSubstring(str, ...args) { | ||
return ReflectApply(StringProtoSubstring, str, args); | ||
} | ||
function StringStartsWith(str) { | ||
for (var _len12 = arguments.length, args = new Array(_len12 > 1 ? _len12 - 1 : 0), _key12 = 1; _key12 < _len12; _key12++) { | ||
args[_key12 - 1] = arguments[_key12]; | ||
} | ||
function StringStartsWith(str, ...args) { | ||
return ReflectApply(StringProtoStartsWith, str, args); | ||
@@ -516,3 +482,3 @@ } | ||
export { ArrayConcat, ArrayCtor, ArrayFilter, ArrayFrom, ArrayIncludes, ArrayIndexOf, ArrayIsArray, ArrayJoin, ArrayPop, ArrayProtoPush, ArrayPush, ArrayShallowClone, ArraySlice, ArraySome, ErrorCtor, FunctionBind, JSONParse, JSONStringify, LIVE_OBJECT_SYMBOL, LockerRangeError, LockerSecurityError, MAGIC_OBJECT_SYMBOL, MapCtor, MapEntries, MapForEach, MapSet, MathMin, ObjectAssign, ObjectCreate, ObjectDefineProperties, ObjectDefineProperty, ObjectFreeze, ObjectGetOwnPropertyDescriptors, ObjectGetOwnPropertyNames, ObjectGetOwnPropertySymbols, ObjectHasOwnProperty, ObjectIsFrozen, ObjectIsSealed, ObjectKeys, ObjectLookupOwnGetter, ObjectLookupOwnSetter, ObjectLookupOwnValue, ObjectPreventExtensions, ObjectSeal, PromiseThen, ProxyCtor, ProxyRevocable, RangeErrorCtor, ReflectApply, ReflectConstruct, ReflectDefineProperty, ReflectDeleteProperty, ReflectGet, ReflectGetOwnPropertyDescriptor, ReflectGetPrototypeOf, ReflectHas, ReflectIsExtensible, ReflectOwnKeys$1 as ReflectOwnKeys, ReflectPreventExtensions, ReflectSet, ReflectSetPrototypeOf$1 as ReflectSetPrototypeOf, RegExpTest, SYMBOL_LIVE_OBJECT, SetAdd, SetCtor, SetDelete, SetHas, StringCharCodeAt, StringIncludes, StringMatch, StringReplace, StringSlice, StringSplit, StringStartsWith, StringSubstring, StringToLowerCase, StringToUpperCase, SymbolFor, SymbolIterator, TypeErrorCtor, WeakMapCtor, WeakMapGet, WeakMapSet, capitalize, createRevokedProxy, emptyArray, escapeRegExp, isLiveObject, isMagicObject, isObject, isObjectLike, markLiveObject, markMagicObject, maskDistortion, sanitizeArguments, shallowCloneOptions, toBoolean, toIgnore, toSafeDescriptorMap, toString, toStringIfNotNullOrUndefined, wrap }; | ||
/*! version: 0.14.15 */ | ||
export { ArrayConcat, ArrayCtor, ArrayFilter, ArrayFrom, ArrayIncludes, ArrayIndexOf, ArrayIsArray, ArrayJoin, ArrayPop, ArrayProtoPush, ArrayPush, ArrayShallowClone, ArraySlice, ArraySome, DateNow, ErrorCtor, FunctionBind, JSONParse, JSONStringify, LIVE_OBJECT_SYMBOL, LockerRangeError, LockerSecurityError, MAGIC_OBJECT_SYMBOL, MapClear, MapCtor, MapEntries, MapForEach, MapGet, MapSet, MathMin, ObjectAssign, ObjectCreate, ObjectDefineProperties, ObjectDefineProperty, ObjectFreeze, ObjectGetOwnPropertyDescriptors, ObjectGetOwnPropertyNames, ObjectGetOwnPropertySymbols, ObjectHasOwnProperty, ObjectIsFrozen, ObjectIsSealed, ObjectKeys, ObjectLookupOwnGetter, ObjectLookupOwnSetter, ObjectLookupOwnValue, ObjectPreventExtensions, ObjectSeal, PromiseThen, ProxyCtor, ProxyRevocable, RangeErrorCtor, ReflectApply, ReflectConstruct, ReflectDefineProperty, ReflectDeleteProperty, ReflectGet, ReflectGetOwnPropertyDescriptor, ReflectGetPrototypeOf, ReflectHas, ReflectIsExtensible, ReflectOwnKeys$1 as ReflectOwnKeys, ReflectPreventExtensions, ReflectSet, ReflectSetPrototypeOf$1 as ReflectSetPrototypeOf, RegExpTest, SYMBOL_LIVE_OBJECT, SetAdd, SetCtor, SetDelete, SetHas, StringCharCodeAt, StringIncludes, StringMatch, StringReplace, StringSlice, StringSplit, StringStartsWith, StringSubstring, StringToLowerCase, StringToUpperCase, SymbolFor, SymbolIterator, TypeErrorCtor, WeakMapCtor, WeakMapGet, WeakMapSet, capitalize, createRevokedProxy, emptyArray, escapeRegExp, getTimestamp, isLiveObject, isMagicObject, isObject, isObjectLike, markLiveObject, markMagicObject, maskDistortion, sanitizeArguments, shallowCloneOptions, toBoolean, toIgnore, toSafeDescriptorMap, toString, toStringIfNotNullOrUndefined, wrap }; | ||
/*! version: 0.14.16 */ |
{ | ||
"name": "@locker/shared", | ||
"version": "0.14.15", | ||
"version": "0.14.16", | ||
"license": "Salesforce Developer Agreement", | ||
@@ -23,3 +23,3 @@ "author": "Salesforce UI Security Team", | ||
], | ||
"gitHead": "32a832ff0f9843d66a82e12ada319e778a0877a2" | ||
"gitHead": "f3b70a2ee94d1a6661b559f4c452092cb1efcc8e" | ||
} |
@@ -5,2 +5,3 @@ export declare function isObject(value: any): boolean; | ||
export declare function toSafeDescriptorMap(descriptorMap: PropertyDescriptorMap): PropertyDescriptorMap; | ||
export declare const getTimestamp: Function; | ||
//# sourceMappingURL=Basic.d.ts.map |
export * from './Array'; | ||
export * from './Basic'; | ||
export * from './Boolean'; | ||
export * from './Date'; | ||
export * from './Distortion'; | ||
@@ -5,0 +6,0 @@ export * from './Error'; |
export declare const MapCtor: MapConstructor; | ||
export declare function MapClear(map: Map<any, any>): ReturnType<typeof Map.prototype.get>; | ||
export declare function MapEntries(map: Map<any, any>): ReturnType<typeof Map.prototype.entries>; | ||
export declare function MapForEach(map: Map<any, any>, iteratee: Function): ReturnType<typeof Map.prototype.forEach>; | ||
export declare function MapGet(map: Map<any, any>, key: any): ReturnType<typeof Map.prototype.get>; | ||
export declare function MapSet(map: Map<any, any>, key: any, value: any): ReturnType<typeof Map.prototype.set>; | ||
//# sourceMappingURL=Map.d.ts.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
52
53816
1026
1