@locker/shared
Advanced tools
Comparing version 0.12.3 to 0.12.4
@@ -147,3 +147,7 @@ /** | ||
const specialCharRegExp = /[\\^$.*+?()[\]{}|]/g; | ||
const RegExpTest = unapply(RegExp.prototype.test); | ||
function escapeRegExp(string) { | ||
return string.replace(specialCharRegExp, '\\$&'); | ||
} | ||
@@ -199,2 +203,16 @@ // To sanitizeArguments that require no transformation | ||
const SYMBOL_LIVE_OBJECT = SymbolFor('@@lockerLiveValue'); | ||
function markLiveObject(object) { | ||
ReflectDefineProperty(object, SYMBOL_LIVE_OBJECT, { | ||
value: undefined, | ||
configurable: false, | ||
enumerable: false, | ||
writable: false, | ||
}); | ||
return object; | ||
} | ||
function isLiveObject(object) { | ||
return ObjectHasOwnProperty(object, SYMBOL_LIVE_OBJECT); | ||
} | ||
exports.ArrayConcat = ArrayConcat; | ||
@@ -255,2 +273,3 @@ exports.ArrayFilter = ArrayFilter; | ||
exports.RegExpTest = RegExpTest; | ||
exports.SYMBOL_LIVE_OBJECT = SYMBOL_LIVE_OBJECT; | ||
exports.SetAdd = SetAdd; | ||
@@ -282,3 +301,5 @@ exports.SetCreate = SetCreate; | ||
exports.defaults = defaults; | ||
exports.escapeRegExp = escapeRegExp; | ||
exports.isFunction = isFunction; | ||
exports.isLiveObject = isLiveObject; | ||
exports.isNull = isNull; | ||
@@ -290,2 +311,3 @@ exports.isNullOrUndefined = isNullOrUndefined; | ||
exports.isUndefined = isUndefined; | ||
exports.markLiveObject = markLiveObject; | ||
exports.maskDistortion = maskDistortion; | ||
@@ -300,2 +322,2 @@ exports.sanitizeArguments = sanitizeArguments; | ||
exports.wrap = wrap; | ||
/** version: 0.12.3 */ | ||
/** version: 0.12.4 */ |
@@ -143,3 +143,7 @@ /** | ||
const specialCharRegExp = /[\\^$.*+?()[\]{}|]/g; | ||
const RegExpTest = unapply(RegExp.prototype.test); | ||
function escapeRegExp(string) { | ||
return string.replace(specialCharRegExp, '\\$&'); | ||
} | ||
@@ -195,3 +199,17 @@ // To sanitizeArguments that require no transformation | ||
export { ArrayConcat, ArrayFilter, ArrayForEach, ArrayFrom, ArrayIncludes, ArrayIsArray, ArrayJoin, ArrayMap, ArrayPush, ArraySome, ErrorCreate, FunctionBind, FunctionCall, JSONParse, JSONStringify, LockerRangeError, LockerSecurityError, MapConcat, MapCreate, MapEntries, MapForEach, MapGet, MapIteratorCreate, MapSet, MathMin, ObjectAssign, ObjectCreate, ObjectDefineProperty, ObjectFreeze, ObjectGetOwnPropertyDescriptors, ObjectGetOwnPropertyNames, ObjectGetOwnPropertySymbols, ObjectHasOwnProperty, ObjectIsFrozen, ObjectIsSealed, ObjectKeys, ObjectPreventExtensions, ObjectSeal, ProxyCreate, ProxyRevocable, RangeErrorCreate, ReflectApply, ReflectConstruct, ReflectDefineProperty, ReflectDeleteProperty, ReflectGet, ReflectGetOwnPropertyDescriptor, ReflectGetPrototypeOf, ReflectHas, ReflectIsExtensible, ReflectOwnKeys, ReflectPreventExtensions, ReflectSet, ReflectSetPrototypeOf, RegExpTest, SetAdd, SetCreate, SetDelete, SetHas, StringCharCodeAt, StringEndsWith, StringIncludes, StringIndexOf, StringMatch, StringReplace, StringSplit, StringStartsWith, StringSubstring, StringToLowerCase, StringToUpperCase, StringTrim, SymbolFor, SymbolIterator, TypeErrorCreate, WeakMapCreate, WeakMapGet, WeakMapHas, WeakMapSet, createRevokedProxy, createSafeObject, defaults, isFunction, isNull, isNullOrUndefined, isObject, isObjectLike, isTrue, isUndefined, maskDistortion, sanitizeArguments, toBoolean, toIgnore, toString, toStringIfNotNullOrUndefined, unapply, unconstruct, wrap }; | ||
/** version: 0.12.3 */ | ||
const SYMBOL_LIVE_OBJECT = SymbolFor('@@lockerLiveValue'); | ||
function markLiveObject(object) { | ||
ReflectDefineProperty(object, SYMBOL_LIVE_OBJECT, { | ||
value: undefined, | ||
configurable: false, | ||
enumerable: false, | ||
writable: false, | ||
}); | ||
return object; | ||
} | ||
function isLiveObject(object) { | ||
return ObjectHasOwnProperty(object, SYMBOL_LIVE_OBJECT); | ||
} | ||
export { ArrayConcat, ArrayFilter, ArrayForEach, ArrayFrom, ArrayIncludes, ArrayIsArray, ArrayJoin, ArrayMap, ArrayPush, ArraySome, ErrorCreate, FunctionBind, FunctionCall, JSONParse, JSONStringify, LockerRangeError, LockerSecurityError, MapConcat, MapCreate, MapEntries, MapForEach, MapGet, MapIteratorCreate, MapSet, MathMin, ObjectAssign, ObjectCreate, ObjectDefineProperty, ObjectFreeze, ObjectGetOwnPropertyDescriptors, ObjectGetOwnPropertyNames, ObjectGetOwnPropertySymbols, ObjectHasOwnProperty, ObjectIsFrozen, ObjectIsSealed, ObjectKeys, ObjectPreventExtensions, ObjectSeal, ProxyCreate, ProxyRevocable, RangeErrorCreate, ReflectApply, ReflectConstruct, ReflectDefineProperty, ReflectDeleteProperty, ReflectGet, ReflectGetOwnPropertyDescriptor, ReflectGetPrototypeOf, ReflectHas, ReflectIsExtensible, ReflectOwnKeys, ReflectPreventExtensions, ReflectSet, ReflectSetPrototypeOf, RegExpTest, SYMBOL_LIVE_OBJECT, SetAdd, SetCreate, SetDelete, SetHas, StringCharCodeAt, StringEndsWith, StringIncludes, StringIndexOf, StringMatch, StringReplace, StringSplit, StringStartsWith, StringSubstring, StringToLowerCase, StringToUpperCase, StringTrim, SymbolFor, SymbolIterator, TypeErrorCreate, WeakMapCreate, WeakMapGet, WeakMapHas, WeakMapSet, createRevokedProxy, createSafeObject, defaults, escapeRegExp, isFunction, isLiveObject, isNull, isNullOrUndefined, isObject, isObjectLike, isTrue, isUndefined, markLiveObject, maskDistortion, sanitizeArguments, toBoolean, toIgnore, toString, toStringIfNotNullOrUndefined, unapply, unconstruct, wrap }; | ||
/** version: 0.12.4 */ |
{ | ||
"name": "@locker/shared", | ||
"version": "0.12.3", | ||
"version": "0.12.4", | ||
"license": "Salesforce Developer Agreement", | ||
@@ -21,3 +21,3 @@ "author": "Salesforce UI Security Team", | ||
}, | ||
"gitHead": "04a89b8ef9516c8ebc5f38a1bb2d93b04deba348" | ||
"gitHead": "d3260278d9ca591eb39a5085ca1332d9ceac7546" | ||
} |
@@ -9,3 +9,3 @@ export declare const ArrayConcat: Function; | ||
export declare const ArraySome: Function; | ||
export declare const ArrayIsArray: <T>(arg: {} | T) => arg is T extends readonly any[] ? unknown extends T ? never : readonly any[] : any[]; | ||
export declare const ArrayIsArray: (arg: any) => arg is any[]; | ||
export declare const ArrayFrom: { | ||
@@ -12,0 +12,0 @@ <T>(arrayLike: ArrayLike<T>): T[]; |
@@ -19,2 +19,3 @@ export * from './Array'; | ||
export * from './WeakMap'; | ||
export * from './LiveObject'; | ||
//# sourceMappingURL=index.d.ts.map |
export declare const RegExpTest: Function; | ||
export declare function escapeRegExp(string: string): string; | ||
//# sourceMappingURL=RegExp.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
37875
44
633
1