Skip to content
String to Object (self explanatory)
JavaScript TypeScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
.editorconfig
.gitattributes
.gitignore
.npmrc
.travis.yml
index.d.ts
index.js
index.test-d.ts
license
package.json
readme.md
test.js

readme.md


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

You can’t perform that action at this time.