0.0.0 • Published 10 years ago

fileobj v0.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
10 years ago

fileobj

Node.js module to handle saving, serializing, and reading an object to and from a file.

Installation

npm install fileobj

Usage

Instantiation

dirname is the directory name where you plan on storing the file data.

var fileObj = require('fileobj')(dirname);

Save

fileObj.save(obj, cb);
  • obj : javascript object to be saved to file.
  • cb : callback that accepts two parameters, err and id (id of the file, used to open).

Read

fileObj.read(id, cb);
  • id : id of the file you wish to open.
  • cb : callback that accepts two parameters, err and object (object read).

All

fileObj.all(cb);
  • cb : callback that accept two parameters, err ids (array of id's of all files).

Author

M. Elliot Frost, CEO and President of Frostware Technical Solutions, LLC