@pnp/core
Advanced tools
Comparing version 3.0.0-v3nightly.20211101 to 3.0.0-v3nightly.20211102
import { objectDefinedNotNull } from "../util.js"; | ||
import cloneDeep from "lodash.clonedeep"; | ||
import { cloneObserverCollection } from "../timeline.js"; | ||
/** | ||
@@ -27,3 +27,3 @@ * Behavior that will copy all the observers in the source timeline and apply it to the incoming instance | ||
} | ||
const clonedSource = cloneDeep(source.observers); | ||
const clonedSource = cloneObserverCollection(source.observers); | ||
const keys = Object.keys(clonedSource); | ||
@@ -30,0 +30,0 @@ for (let i = 0; i < keys.length; i++) { |
{ | ||
"name": "@pnp/core", | ||
"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 |
import { broadcast, lifecycle } from "./moments.js"; | ||
import { objectDefinedNotNull, isArray, isFunc } from "./util.js"; | ||
import cloneDeep from "lodash.clonedeep"; | ||
/** | ||
@@ -34,3 +33,3 @@ * Timeline represents a set of operations executed in order of definition, | ||
toArray: () => { | ||
return Reflect.has(target.observers, p) ? cloneDeep(Reflect.get(target.observers, p)) : []; | ||
return Reflect.has(target.observers, p) ? [...Reflect.get(target.observers, p)] : []; | ||
}, | ||
@@ -145,3 +144,3 @@ replace: (handler) => { | ||
this._inheritingObservers = false; | ||
this.observers = cloneDeep(this.observers); | ||
this.observers = cloneObserverCollection(this.observers); | ||
} | ||
@@ -183,2 +182,8 @@ } | ||
} | ||
export function cloneObserverCollection(source) { | ||
return Reflect.ownKeys(source).reduce((clone, key) => { | ||
clone[key] = [...source[key]]; | ||
return clone; | ||
}, {}); | ||
} | ||
//# 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
76626
1
1221
- Removedlodash.clonedeep@^4.5.0
- Removedlodash.clonedeep@4.5.0(transitive)