Skip to content
/ s-to-o Public

String to Object (self explanatory)

License

abranhe/s-to-o

Repository files navigation


s-to-o

Convert an string into an object

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

About

String to Object (self explanatory)

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published