json-string-splitter
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/json-string-splitter package

1.0.0 • Public • Published

JSON-String-Splitter

Split concatenated JSON strings.

License: LGPL View on npm Build Status

Installation

Install with npm, or link the packaged file from your html:

npm install --save json-string-splitter

OR

wget https://raw.githubusercontent.com/Densaugeo/JSON-String-Splitter/master/build/Splitter.pkgd.min.js

Import

Supports node.js, AMD, and browser global modules.

In node or with browserify:
var splitter = require('json-string-splitter');

Or directly in html:
<script type="text/javascript" src="/your/folders/Splitter.pkgd.min.js"></script>

Usage

var splitter = require('json-string-splitter');

var pieces = splitter('{"foo":"bar"}{"more":"json"}{"partial":"json"');

console.log(pieces.jsons[0]); // '{"foo":"bar"}'
console.log(pieces.jsons[1]); // '{"more":"json"}'
console.log(pieces.remainder); // '{"partial":"json"'

License

LGPL

Readme

Keywords

Package Sidebar

Install

npm i json-string-splitter

Weekly Downloads

51

Version

1.0.0

License

LGPL-2.1+

Last publish

Collaborators

  • densaugeo