@pnp/core-commonjs
Advanced tools
Comparing version 3.0.0-v3nightly.20211101 to 3.0.0-v3nightly.20211102
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.CopyFrom = void 0; | ||
const tslib_1 = require("tslib"); | ||
const util_js_1 = require("../util.js"); | ||
const lodash_clonedeep_1 = (0, tslib_1.__importDefault)(require("lodash.clonedeep")); | ||
const timeline_js_1 = require("../timeline.js"); | ||
/** | ||
@@ -32,3 +31,3 @@ * Behavior that will copy all the observers in the source timeline and apply it to the incoming instance | ||
} | ||
const clonedSource = (0, lodash_clonedeep_1.default)(source.observers); | ||
const clonedSource = (0, timeline_js_1.cloneObserverCollection)(source.observers); | ||
const keys = Object.keys(clonedSource); | ||
@@ -35,0 +34,0 @@ for (let i = 0; i < keys.length; i++) { |
{ | ||
"name": "@pnp/core-commonjs", | ||
"version": "3.0.0-v3nightly.20211101", | ||
"version": "3.0.0-v3nightly.20211102", | ||
"description": "pnp - provides shared functionality across all pnp libraries", | ||
@@ -8,4 +8,3 @@ "main": "./index.js", | ||
"dependencies": { | ||
"tslib": "2.1.0", | ||
"lodash.clonedeep": "^4.5.0" | ||
"tslib": "2.1.0" | ||
}, | ||
@@ -12,0 +11,0 @@ "author": { |
@@ -110,3 +110,4 @@ /** | ||
} | ||
export declare function cloneObserverCollection(source: ObserverCollection): ObserverCollection; | ||
export {}; | ||
//# sourceMappingURL=timeline.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Timeline = void 0; | ||
const tslib_1 = require("tslib"); | ||
exports.cloneObserverCollection = exports.Timeline = void 0; | ||
const moments_js_1 = require("./moments.js"); | ||
const util_js_1 = require("./util.js"); | ||
const lodash_clonedeep_1 = (0, tslib_1.__importDefault)(require("lodash.clonedeep")); | ||
/** | ||
@@ -38,3 +36,3 @@ * Timeline represents a set of operations executed in order of definition, | ||
toArray: () => { | ||
return Reflect.has(target.observers, p) ? (0, lodash_clonedeep_1.default)(Reflect.get(target.observers, p)) : []; | ||
return Reflect.has(target.observers, p) ? [...Reflect.get(target.observers, p)] : []; | ||
}, | ||
@@ -149,3 +147,3 @@ replace: (handler) => { | ||
this._inheritingObservers = false; | ||
this.observers = (0, lodash_clonedeep_1.default)(this.observers); | ||
this.observers = cloneObserverCollection(this.observers); | ||
} | ||
@@ -188,2 +186,9 @@ } | ||
} | ||
function cloneObserverCollection(source) { | ||
return Reflect.ownKeys(source).reduce((clone, key) => { | ||
clone[key] = [...source[key]]; | ||
return clone; | ||
}, {}); | ||
} | ||
exports.cloneObserverCollection = cloneObserverCollection; | ||
//# sourceMappingURL=timeline.js.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
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
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
79193
1
1274
- Removedlodash.clonedeep@^4.5.0
- Removedlodash.clonedeep@4.5.0(transitive)