Object to freeze. Should be an object or an array, otherwise has on effect.
Always returns obj
.
import freeze from "apprt-core/freeze";
let src = {x: 1, y: { a: 2 } };
let srcFrozen = freeze(src);
src === srcFrozen // -> true
src.x = 3 // still 1, change not possible
src.y.a = 3 // still 2, change not possible
Generated using TypeDoc
Freezes an object or array deeply. The given obj is frozen deeply, no changes can be made after that on the obj nor its children after that.