Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@locker/shared

Package Overview
Dependencies
Maintainers
7
Versions
226
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@locker/shared - npm Package Compare versions

Comparing version 0.14.7 to 0.14.11

types/MagicObject.d.ts

46

dist/index.cjs.js

@@ -29,5 +29,7 @@ /*!

join: ArrayProtoJoin,
pop: ArrayProtoPop,
slice: ArrayProtoSlice,
some: ArrayProtoSome
} = Array.prototype;
const emptyArray = [];
const ArrayCtor = Array;

@@ -87,2 +89,6 @@ const {

function ArrayPop(arr) {
return ReflectApply(ArrayProtoPop, arr, emptyArray);
}
function ArrayPush(arr) {

@@ -112,3 +118,2 @@ for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {

const emptyArray = [];
const {

@@ -278,6 +283,8 @@ create: ObjectCreate$1

} = Symbol;
const SYMBOL_LIVE_OBJECT = SymbolFor('@@lockerLiveValue');
const LIVE_OBJECT_SYMBOL = SymbolFor('@@lockerLiveValue'); // This is used by packages/locker-core-engine/src/LockerFilter.js
const SYMBOL_LIVE_OBJECT = LIVE_OBJECT_SYMBOL;
function markLiveObject(object) {
ReflectDefineProperty(object, SYMBOL_LIVE_OBJECT, {
ReflectDefineProperty(object, LIVE_OBJECT_SYMBOL, {
value: undefined,

@@ -292,5 +299,29 @@ configurable: false,

function isLiveObject(object) {
return ObjectHasOwnProperty(object, SYMBOL_LIVE_OBJECT);
return ObjectHasOwnProperty(object, LIVE_OBJECT_SYMBOL);
}
/**
* @@lockerMagicValue is used to mark objects that have magical side effects
* when setting properties, which would be broken by a Define Property
* operation. A concrete example is the `style` property of an HTMLElement in
* Safari <= 14. Defining this marker will signal to the membrane that
* it must use a Set operation, instead of a Define Property operation.
*/
const MAGIC_OBJECT_SYMBOL = SymbolFor('@@lockerMagicValue');
function markMagicObject(object) {
ReflectDefineProperty(object, MAGIC_OBJECT_SYMBOL, {
value: undefined,
configurable: false,
enumerable: false,
writable: false
});
return object;
}
function isMagicObject(object) {
return ObjectHasOwnProperty(object, MAGIC_OBJECT_SYMBOL);
}
const {

@@ -490,2 +521,3 @@ entries: MapProtoEntries,

exports.ArrayJoin = ArrayJoin;
exports.ArrayPop = ArrayPop;
exports.ArrayProtoPush = ArrayProtoPush;

@@ -500,4 +532,6 @@ exports.ArrayPush = ArrayPush;

exports.JSONStringify = JSONStringify;
exports.LIVE_OBJECT_SYMBOL = LIVE_OBJECT_SYMBOL;
exports.LockerRangeError = LockerRangeError;
exports.LockerSecurityError = LockerSecurityError;
exports.MAGIC_OBJECT_SYMBOL = MAGIC_OBJECT_SYMBOL;
exports.MapCtor = MapCtor;

@@ -569,5 +603,7 @@ exports.MapEntries = MapEntries;

exports.isLiveObject = isLiveObject;
exports.isMagicObject = isMagicObject;
exports.isObject = isObject;
exports.isObjectLike = isObjectLike;
exports.markLiveObject = markLiveObject;
exports.markMagicObject = markMagicObject;
exports.maskDistortion = maskDistortion;

@@ -582,2 +618,2 @@ exports.sanitizeArguments = sanitizeArguments;

exports.wrap = wrap;
/*! version: 0.14.7 */
/*! version: 0.14.11 */

@@ -24,5 +24,7 @@ /*!

join: ArrayProtoJoin,
pop: ArrayProtoPop,
slice: ArrayProtoSlice,
some: ArrayProtoSome
} = Array.prototype;
const emptyArray = [];
const ArrayCtor = Array;

@@ -82,2 +84,6 @@ const {

function ArrayPop(arr) {
return ReflectApply(ArrayProtoPop, arr, emptyArray);
}
function ArrayPush(arr) {

@@ -107,3 +113,2 @@ for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {

const emptyArray = [];
const {

@@ -273,6 +278,8 @@ create: ObjectCreate$1

} = Symbol;
const SYMBOL_LIVE_OBJECT = SymbolFor('@@lockerLiveValue');
const LIVE_OBJECT_SYMBOL = SymbolFor('@@lockerLiveValue'); // This is used by packages/locker-core-engine/src/LockerFilter.js
const SYMBOL_LIVE_OBJECT = LIVE_OBJECT_SYMBOL;
function markLiveObject(object) {
ReflectDefineProperty(object, SYMBOL_LIVE_OBJECT, {
ReflectDefineProperty(object, LIVE_OBJECT_SYMBOL, {
value: undefined,

@@ -287,5 +294,29 @@ configurable: false,

function isLiveObject(object) {
return ObjectHasOwnProperty(object, SYMBOL_LIVE_OBJECT);
return ObjectHasOwnProperty(object, LIVE_OBJECT_SYMBOL);
}
/**
* @@lockerMagicValue is used to mark objects that have magical side effects
* when setting properties, which would be broken by a Define Property
* operation. A concrete example is the `style` property of an HTMLElement in
* Safari <= 14. Defining this marker will signal to the membrane that
* it must use a Set operation, instead of a Define Property operation.
*/
const MAGIC_OBJECT_SYMBOL = SymbolFor('@@lockerMagicValue');
function markMagicObject(object) {
ReflectDefineProperty(object, MAGIC_OBJECT_SYMBOL, {
value: undefined,
configurable: false,
enumerable: false,
writable: false
});
return object;
}
function isMagicObject(object) {
return ObjectHasOwnProperty(object, MAGIC_OBJECT_SYMBOL);
}
const {

@@ -477,3 +508,3 @@ entries: MapProtoEntries,

export { ArrayConcat, ArrayCtor, ArrayFilter, ArrayFrom, ArrayIncludes, ArrayIndexOf, ArrayIsArray, ArrayJoin, ArrayProtoPush, ArrayPush, ArrayShallowClone, ArraySlice, ArraySome, ErrorCtor, FunctionBind, JSONParse, JSONStringify, LockerRangeError, LockerSecurityError, 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, isObject, isObjectLike, markLiveObject, maskDistortion, sanitizeArguments, shallowCloneOptions, toBoolean, toIgnore, toSafeDescriptorMap, toString, toStringIfNotNullOrUndefined, wrap };
/*! version: 0.14.7 */
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.11 */

5

package.json
{
"name": "@locker/shared",
"version": "0.14.7",
"version": "0.14.11",
"license": "Salesforce Developer Agreement",

@@ -9,2 +9,3 @@ "author": "Salesforce UI Security Team",

"module": "dist/index.js",
"sideEffects": false,
"typings": "types/index.d.ts",

@@ -22,3 +23,3 @@ "publishConfig": {

],
"gitHead": "3e2c8ce19585715d0db2d0980088de1e5c4e2998"
"gitHead": "3ac0b52b291246692fa015a42e52661c6feea82f"
}

@@ -0,1 +1,2 @@

export declare const emptyArray: [];
export declare const ArrayCtor: ArrayConstructor;

@@ -14,2 +15,3 @@ export declare const ArrayFrom: {

export declare function ArrayJoin(arr: any[], ...args: string[]): ReturnType<typeof Array.prototype.join>;
export declare function ArrayPop(arr: any[]): ReturnType<typeof Array.prototype.pop>;
export declare function ArrayPush(arr: any[], ...args: Parameters<typeof Array.prototype.push>): ReturnType<typeof Array.prototype.push>;

@@ -19,3 +21,2 @@ export declare function ArrayShallowClone(arr: any[]): any[];

export declare function ArraySome(arr: any[], iteratee: Function): ReturnType<typeof Array.prototype.some>;
export declare const emptyArray: [];
//# sourceMappingURL=Array.d.ts.map

@@ -9,2 +9,3 @@ export * from './Array';

export * from './LiveObject';
export * from './MagicObject';
export * from './Map';

@@ -11,0 +12,0 @@ export * from './Math';

@@ -0,1 +1,2 @@

export declare const LIVE_OBJECT_SYMBOL: symbol;
export declare const SYMBOL_LIVE_OBJECT: symbol;

@@ -2,0 +3,0 @@ export declare function markLiveObject(object: any): any;

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc