Skip to main content

Command Palette

Search for a command to run...

Today's npm package: javascript-stringify

Published
•1 min read•View as Markdown
P

I am developer from India currently based in Berlin, Germany.

I am very interested in Design, though I don't design 😉 I take care of it while making my apps.

Photography, videography and having random conversation over beer are my activities of spare time. Timelapses and hyperlapses make me wonder all the time 😊

Today's npm package is javascript-stringify

You can use this package to convert JavaScript to string so that it can be evaluated later with eval

const { stringify } = require("javascript-stringify");

const square = (x) => Math.pow(x, 2);

const stringifiedSquare = stringify( square )

console.log(typeof stringifiedSquare, stringifiedSquare)

javascript-stringify

See it in action here: https://runkit.com/pankaj/javascript-stringify

Stay tuned for tomorrow's package of the Day.

More from this blog

P

Pankaj Patel - @heypankaj_

63 posts

Sharing my learnings and thoughts on Blogging, Personal Branding and Programming