import { esc } from 'deleight/apriori'
const obj = { a: 1, b: 'no special chars', c: '<p>But I am a paragraph</p>', d: { e: '<p>"esc" will still work here</p>' } }
const escObj = esc(obj);
console.log(escObj.c); // <p>But I am a paragraph</p>
console.log(escObj.d.e); // <p>"esc" will still work here</p>
Returns an object which escapes properties sourced from it. Escaping markup is a key component of template rendering, so this is an important function to have here.
NB: there are no tests yet. Please report any bugs.