test.js 251 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 /* global jsonMask */ function assert (o) { if (!o) throw new Error('AssertionError') } var r = jsonMask({p: {a: 1, b: 2}, z: 1}, 'p/a,z') assert(r.p.a) assert(r.z) assert(typeof r.p.b === 'undefined') document.getElementById('res').innerHTML = 'ok'