Nary a Package Missing

    node-sjson

    1.1.0 • Public • Published

    node-sjson

    Build Status

    Parsing JSON without raising your voice

    I got tired of writing my JSON.parse(...) in try...catch blocks to prevent wrong inputs to raise an exception, so this is the poor man's solution to do it without too much fuss.

    Installation

    npm install sjson
    

    Usage

    var sjson = require('node-sjson')
     
    sjson('{"a":1}') // {a: 1}
    sjson('{"a":...--') // undefined
    sjson('{"a":...--', 'fallback value') // 'fallback value'

    Tests

    Simply run npm test in the root of the repo.

    Keywords

    Install

    npm i node-sjson

    DownloadsWeekly Downloads

    8

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    7.1 kB

    Total Files

    6

    Last publish

    Collaborators

    • odino