stringifunction
v1.0.2
Published
Convert Javascript objects to and from JSON while preserving functions/methods.
Downloads
1
Maintainers
Readme
StringiFunction
Convert Javascript objects to and from JSON while preserving functions/methods.
Does not use eval
to functionize strings. Uses slightly less diabolical Function constructor.
How to use it...
import { stringiFunctionize, parseStringiFunctions } from 'stringifunction';
stringiFunctionize(object); // Returns a JSON string.
parseStringiFunctions(json); // Returns a JavaScript Object.
But first: npm i stringifunction
installs the thing.