1.2.1 • Published 5 years ago

s-to-o v1.2.1

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

s-to-o

Convert an string into an object

npm.io npm.io npm.io npm.io npm.io npm.io

Install

npm install s-to-o

Usage

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' }

API

sto(input)

Type: function

Return Type: object

A replacement for JSON.parse() which converts an string into an object.

input

Type: string

String to be parsed.

Related

License

MIT © Abraham Hernandez