VictorTaelin / PureState

The stupidest state management library that works.
MIT License
310 stars 18 forks source link

Would you accept node.toJSON #10

Closed AutoSponge closed 7 years ago

AutoSponge commented 7 years ago

By adding node.toJSON = function () {return node.value} you can augment the example from the readme to include:

JSON.stringify({x: x, y: y, z: z})
//> "{"x":10,"y":11,"z":[10,11,21]}"

Would you accept this as a PR?