string2data

1.1.0 • Public • Published

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"
//     }
//   }
// ]

Dependencies (0)

    Dev Dependencies (13)

    Package Sidebar

    Install

    npm i string2data

    Weekly Downloads

    0

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    9 kB

    Total Files

    16

    Last publish

    Collaborators

    • obetomuniz