View on GitHub

json.filed

Framework for processing JSON file on node.js

Download this project as a .zip file Download this project as a tar.gz file

json.filed

Framework for processing JSON file on node.js

Core concept

JSON file as variable in program which runs on node.js

Use case

Install

sudo npm install -g json.filed

page in npm site

hello world

var jf = require('json.filed');

jf.filed('./data.json')
.write( { msg: 'hello world.'} )
.read( json => { console.log( json.msg ) } )
.exec();

how to use ...

REPL

Supports REPL feature.

$ sudo npm install -g json.filed
$ json.filed
> hello = jf.filed('./hello.json')
filedExecuter {
  parent: null,
  io: [Function],
  read: [Function],
  in: [Function],
  write: [Function],
  out: [Function],
  copy: [Function],
  link: [Function],
  pass: [Function],
  filter: [Function],
  calledback: [Function],
  httpServe: [Function],
  parallel: [Function],
  collect: [Function],
  exec: [Function],
  plan: [Function],
  file: [Function],
  _events: { error: [Function] },
  _eventsCount: 1 }
> hello.read( o => { val = o }).exec()
rootPlan {
  _nextPlan:
   executePlan {
     _nextPlan:
      notexecPlan {
        _nextPlan: null,
        next: [Function],
        exec: [Function],
        runtime: [Object] },
     next: [Function],
     exec: [Function],
     runtime:
      runtimeInformation {
        collect: [Function],
        addJsonFile: [Function],
        removeJsonFile: [Function],
        resetJsonFile: [Function],
        countInProgress: [Function] } },
  next: [Function],
  exec: [Function],
  fixedFiles: [ JsonFile { path: [Function] } ],
  runtime:
   runtimeInformation {
     collect: [Function],
     addJsonFile: [Function],
     removeJsonFile: [Function],
     resetJsonFile: [Function],
     countInProgress: [Function] } }
> val
{ msg: 'Hello World' }

Deferred

Reading and writing file and so on are executed in deferred manner to make best use of node.js.

Reference

See this page

Examples

See this page