New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@aofl/object-utils

Package Overview
Dependencies
Maintainers
3
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aofl/object-utils - npm Package Compare versions

Comparing version 1.0.0-beta.26 to 1.0.0-beta.27

documentation/__config/html-webpack-config.js

37

index.js

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

export const deepFreeze = (o) => {
Object.freeze(o);
Object.getOwnPropertyNames(o).forEach((prop) => {
if (o.hasOwnProperty(prop) && o[prop] !== null &&
(typeof o[prop] === 'object' || typeof o[prop] === 'function') &&
!Object.isFrozen(o[prop])) {
deepFreeze(o[prop]);
}
});
return o;
};
export const deepAssign = (obj, path, payload) => {
let pathParts = path.split('.');
if (path === '') {
pathParts = [];
}
let recursiveAssign = (pathParts, obj) => {
if (pathParts.length === 0) {
return Object.assign({}, obj, payload);
}
let key = pathParts[0];
let subPath = pathParts.splice(1);
return Object.assign({}, obj, {
[key]: recursiveAssign(subPath, obj[key])
});
};
return recursiveAssign(pathParts, obj);
};
export {deepAssign} from './src/deep-assign-service';
export {deepFreeze} from './src/deep-feeze-service';
{
"name": "@aofl/object-utils",
"version": "1.0.0-beta.26",
"version": "1.0.0-beta.27",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

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