1.1.0 • Published 7 years ago

node-sjson v1.1.0

Weekly downloads
14
License
MIT
Repository
-
Last release
7 years ago

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.

1.1.0

7 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago