smart-stringifier

0.1.0 • Public • Published

smart-stringifier

Smart way to stringify objects, arrays, maps to make it short and readable

Build Status

Examples

Here is an example of smartStringifier.stringify:

[["rnbqkbnr/p1pp1ppp/1p2p3/8/3PP3/8/PPP2PPP/RNBQKBNR w KQkq - 0 3",[ {"best": "Bd3", "e": {"v": 0.46, "d": 36}, "pgn": ["e4","e6","d4","b6"]}, {"best": "Bd3", "e": {"v": 0.39, "d": 34}, "pgn": ["e4","b6","d4","e6"]}]], ["rnbqkbnr/p1pppp1p/1p4p1/8/3PP3/8/PPP2PPP/RNBQKBNR w KQkq - 0 3",[ {"best": "Nf3", "e": {"v": 0.58, "d": 34}, "pgn": ["e4","b6","d4","g6"]}, {"best": "h4", "e": {"v": 0.58, "d": 34}, "pgn": ["e4","g6","d4","b6"]}, {"best": "h4", "e": {"v": 0.75, "d": 30}, "pgn": ["d4","g6","e4","b6"]}, {"best": "h4", "e": {"v": 0.75, "d": 30}, "pgn": ["d4","b6","e4","g6"]}]]]

See specs for other examples of formatting

Install

Use Node v5 or higher.

npm install

Package Sidebar

Install

npm i smart-stringifier

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • scorpibear