Skip to content

sebastianroming/json-value-replacer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published