1.1.0 • Published 1 year ago

string2data v1.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

string2data

Extract structured data from text with ease using a simple and intuitive syntax.

Installation

npm install string2data

Usage

import { getJSON } from "string2data"

getJSON(
  `this is a big dynamic text with JSON { "title": "My Title", "labels": ["label one", "label two"], "active": true } and { "description": "A description", "author": { "name": "Author Name" } }`
)

// Output:
//
// [
//   {
//     "title": "My Title",
//     "labels": [
//       "label one",
//       "label two"
//     ],
//     "active": true
//   },
//   {
//     "description": "A description",
//     "author": {
//       "name": "Author Name"
//     }
//   }
// ]
1.1.0

1 year ago

1.0.0

1 year ago