Initial boiler plate project

This commit is contained in:
2024-09-24 03:52:46 +00:00
parent 6120b2d6c3
commit 154b93e267
10034 changed files with 2079352 additions and 2 deletions

27
node_modules/next/dist/esm/shared/lib/deep-freeze.js generated vendored Normal file
View File

@ -0,0 +1,27 @@
/**
* Recursively freezes an object and all of its properties. This prevents the
* object from being modified at runtime. When the JS runtime is running in
* strict mode, any attempts to modify a frozen object will throw an error.
*
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze
* @param obj The object to freeze.
*/ export function deepFreeze(obj) {
// If the object is already frozen, there's no need to freeze it again.
if (Object.isFrozen(obj)) return obj;
// An array is an object, but we also want to freeze each element in the array
// as well.
if (Array.isArray(obj)) {
for (const item of obj){
if (!item || typeof item !== "object") continue;
deepFreeze(item);
}
return Object.freeze(obj);
}
for (const value of Object.values(obj)){
if (!value || typeof value !== "object") continue;
deepFreeze(value);
}
return Object.freeze(obj);
}
//# sourceMappingURL=deep-freeze.js.map