json-value-replacer

0.1.1 • Public • Published

json-value-replacer Build Status

replaces all values in a JSON object, no matter how deep.

Install

npm install --save json-value-replacer

Usage

const jsonValueReplacer = require('json-value-replacer');
 
const obj = { 'a': 'value a', 'b': 'value b', 'c': { 'd': 'value c', 'e': { 'f': 'value f' } } };
 
console.log(jsonValueReplacer(obj, "#####"));
// -> { a: '#####', b: '#####', c: { d: '#####', e: { f: '#####' } } }
 
console.log(jsonValueReplacer.shuffle(obj));
// -> { a: ' luaave', b: 'bulave ', c: { d: 'c eulav', e: { f: 'flaev u' } } }
 
console.log(jsonValueReplacer.sameLength(obj, '#'));
// -> { a: '#######', b: '#######', c: { d: '#######', e: { f: '#######' } } }

License

MIT © Sebastian Roming

Readme

Keywords

Package Sidebar

Install

npm i json-value-replacer

Weekly Downloads

127

Version

0.1.1

License

MIT

Unpacked Size

4.91 kB

Total Files

6

Last publish

Collaborators

  • sebastianroming