Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jsonfile-obj-db

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonfile-obj-db - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

24

main.js

@@ -41,4 +41,26 @@ const jsonfile = require( "jsonfile" );

},
save: function() { jsonfile.writeFileSync( WC._DB_PATH , WC.self ); }
save: function() { jsonfile.writeFileSync( WC._DB_PATH , WC.self ); },
edit: function( ...args ) {
// https://stackoverflow.com/questions/16533384/javascript-assign-value-to-element-in-nested-object-without-knowing-level
var x1 = args;
var wNV = x1.pop();
function recReplace( o , i ) {
var ii = i.shift();
if ( i.length == 0 ) {
o[ ii ] = wNV;
}
else {
o[ ii ] = recReplace( o[ ii ] , i );
}
return o;
}
WC.self = recReplace( WC.self , x1 );
WC.save();
}
};
module.exports = WC;

2

package.json
{
"name": "jsonfile-obj-db",
"version": "1.0.5",
"version": "1.0.6",
"description": "",

@@ -5,0 +5,0 @@ "main": "main.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