golden-fleece

node v8.17.0
version: 1.0.0
endpointsharetweet
const fleece = require('golden-fleece'); const str = `{ string: 'hello', number: 1, array: [ 'a', 'b', 'c' ], arrayWithoutSpaces: ['d', 'e', 'f'], object: { foo: 99, "unnecessarilyQuotedProperty": null }, largerObject: { // sometimes you need several lines // for readability. Also, comments! one: 'thing', two: 'thing', red: 'thing', blue: 'thing' } }`; const object = fleece.evaluate(str); object.string = 'goodbye'; object.number = 42; object.array = ['p', 'q', 'r']; object.arrayWithoutSpaces = ['x', 'y', 'z']; object.largerObject = { three: 'potato', four: 'potato', one: 'potato', two: 'potato' }; fleece.patch(str, object);
Loading…

no comments

    sign in to comment