Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/boenfu/object-string-parser
"{foo: 200}" => [object Object]
https://github.com/boenfu/object-string-parser
Last synced: 1 day ago
JSON representation
"{foo: 200}" => [object Object]
- Host: GitHub
- URL: https://github.com/boenfu/object-string-parser
- Owner: boenfu
- License: mit
- Created: 2022-02-28T14:25:25.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-02-28T14:47:33.000Z (over 2 years ago)
- Last Synced: 2024-11-13T15:11:52.918Z (6 days ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# object-string-parser
> ⚠️⚠️⚠️ actually the source code is only one sentence, and not secure, so don't use it.
#### Install
```bash
npm install object-string-parser
```#### Usage
```javascript
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}`
```