Skip to content

Latest commit

 

History

History
35 lines (30 loc) · 745 Bytes

README.md

File metadata and controls

35 lines (30 loc) · 745 Bytes

json-prefix

travis NPM Version NPM Downloads

traverse json tree add prefix to string

var prefix = require('json-prefix')

var json = {
  foo: {
    bar: 'foo/bar'
  },
  stringa: 'stringa',
  number: 7
}

var result = prefix(json, 'prefixstr')

console.log(result)
/**
{
  foo: {
    bar: 'prefixstrfoo/bar'
  },
  stringa: 'prefixstrstringa',
  number: 7  
}
*/