0.0.9 • Published 8 years ago

rekurtz v0.0.9

Weekly downloads
5
License
ISC
Repository
github
Last release
8 years ago

rekurtz

Querying into unknown JSON structures can sometimes seem like a journey into a dark and foreboding jungle, along a murky, twisting river, surrounded by unknown dangerous creatures.

THE HORROR

What will you find? Maybe what you're looking for. Maybe something like...

> var foo = {bar: {baz: 'bang'}};
undefined
> foo.bar.baz.huh.boom
TypeError: Cannot read property 'boom' of undefined
    at repl:1:16
    at REPLServer.defaultEval (repl.js:262:27)
    at bound (domain.js:287:14)
    at REPLServer.runBound [as eval] (domain.js:300:12)
    at REPLServer.<anonymous> (repl.js:431:12)
    at emitOne (events.js:82:20)
    at REPLServer.emit (events.js:169:7)
    at REPLServer.Interface._onLine (readline.js:211:10)
    at REPLServer.Interface._line (readline.js:550:8)
    at REPLServer.Interface._ttyWrite (readline.js:827:14)
> 

Use rekurtz and you will get something more like this...

> var jaison = require('./')({bar: {baz: 'bang'}});
undefined
> jaison('bar.baz.huh.boom')
'no such key bar.baz.huh.boom'
> 

API

import rekurtz from 'rekurtz';

let j = rekurtz({some: {json: {structure: 'here'}}}[, 'some']);
console.log(j('structure')); //'here'
console.log(j('structure.heart.of.darkness')) //'no such key structure.heart.of.darkness'
0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.1

8 years ago