Skip to content
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.
/ fileobj Public archive

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

Notifications You must be signed in to change notification settings

frostme/fileobj

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published