New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

update-json

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

update-json

NodeJS module for updating JSON files.

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
243
16.27%
Maintainers
1
Weekly downloads
 
Created
Source

Update JSON

NodeJS module for updating JSON files.

Ideal for simple JSON modifications, e.g. bumping version of package.json, etc.

Install

npm install update-json

How to use it

var updateJson = require('update-json');

// let's assume the file contains this:
// {aaa: 'bbb', ccc: 'ddd'}
var file_path = './test.json';

var data = {ccc: 'xxx', yyy: 'zzz'};

updateJson(file_path, data, function (error) {
  if (error) {
    throw error;
  }
  else {
    // now the file contains this:
    // {aaa: 'bbb', ccc: 'xxx', yyy: 'zzz'}
  }
});

Bug reports, feature requests and contact

If you found any bugs, if you have feature requests or any questions, please, either file an issue at GitHub or send me an e-mail at riki@fczbkk.com.

License

This library is published under the MIT license.

Keywords

json

FAQs

Package last updated on 25 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts