Skip to content

boenfu/object-string-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

object-string-parser

⚠️⚠️⚠️ actually the source code is only one sentence, and not secure, so don't use it.

Install

npm install object-string-parser

Usage

import { parse } from "object-string-parser";

// 1.
const obj = parse("{foo: 200}").foo; // 200 😄

// 2.
JSON.stringify(parse("{bar: 50}"), undefined, 2);
// convert `{bar: 50}` to `{"bar": 50}`

About

"{foo: 200}" => [object Object]

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published