Convert an string into an object
npm install s-to-o
const sto = require('s-to-o');
console.log(sto('a: 1, b: 2, c: 3, d: 4'));
// => { a: '1', b: '2', c: '3', d: '4' }
Type: function
Return Type: object
A replacement for JSON.parse() which converts an string into an object.
Type: string
String to be parsed.
- str-to-arr: Add words from a string to an array
MIT © Abraham Hernandez