0.1.8 • Published 9 years ago
json.filed v0.1.8
json.filed
Framework for processing JSON file
Core concept
JSON file as variable in program which runs on node.js
Use case
- what
- read, write and process JSON files
- share JSON files between nodes
- collect contents of multiple JSON files into a JSON file.
- and so on.
- when
- Applications need to store data, but DBMS is not the case.
- Server handling JSON
- IoT device writes and reads JSON
- Scripts handling JSON files on a node
- Handle JSON from several sources
- JSON from file
- JSON from url
- JSON from listened event
- and so on.
hello world
var jf = require('json.filed');
jf.filed('./data.json')
.write( { msg: 'hello world.'} )
.read( json => { console.log( json.msg ) } )
.exec();
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
GitHub Page
0.1.8
9 years ago
0.1.7
9 years ago
0.1.6
9 years ago
0.1.5
9 years ago
0.1.4
9 years ago
0.1.3
9 years ago
0.1.2
9 years ago
0.1.1
9 years ago
0.1.0
9 years ago
0.0.29
9 years ago
0.0.28
9 years ago
0.0.27
9 years ago
0.0.26
9 years ago
0.0.25
9 years ago
0.0.24
9 years ago
0.0.23
9 years ago
0.0.22
9 years ago
0.0.21
9 years ago
0.0.20
9 years ago
0.0.19
9 years ago
0.0.18
9 years ago
0.0.17
9 years ago
0.0.16
9 years ago
0.0.15
9 years ago
0.0.14
9 years ago
0.0.13
9 years ago
0.0.12
9 years ago
0.0.11
9 years ago
0.0.10
9 years ago
0.0.9
9 years ago