s-to-o
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published


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

/s-to-o/

    Package Sidebar

    Install

    npm i s-to-o

    Weekly Downloads

    3

    Version

    1.2.1

    License

    MIT

    Unpacked Size

    3.55 kB

    Total Files

    6

    Last publish

    Collaborators

    • abranhe