1.2.0 • Published 8 months ago

ezdata v1.2.0

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months ago

EZData

A simple Node.js package for managing an application's data (store, read, write).

Installation

Install using npm:

npm install ezdata

Usage

To create an instance of 'EZData', pass in the name of your application and, optionally, an object that represents the structure of the apps data directory. If an object is not passed as the second arg, it's assumed that a file with the name 'ezdata.schema' is located at the base of your apps directory containing a JSON object that represents the structure of the apps data directory.

Example ezdata.schema file:

{
    "dirOne": {
        "fileOne.json": "File one contents",
        "fileTwo.json": "File two contents"
    },
    "dirTwo": {
        "dirThree": {
            "fileThree.txt": "File three contents"
        }
    }
}

An instance of EZData can then be created:

const EZData = require('ezdata');
const appName = 'myAppName';

const ezdata = EZData(appName);

Using the schema in the example above, console.log(ezdata) would produce an output of:

{
  fileOne: 'File one contents',
  fileTwo: 'File two contents',
  fileThree: 'File three contents',
  ...
}

Features

- automatically creates applications directory structure
- automatically loads the app's files data
- allows easy reading/writing of app file data

Documentation

For detailed documentation and examples, please refer to the official documentation.

Contributing

We welcome contributions from the community. If you'd like to contribute to this project, please follow these guidelines:

Fork the repository.
Create a new branch for your feature or bug fix.
Make your changes and ensure the code is well-documented.
Write tests for your code (if applicable).
Submit a pull request with a clear description of your changes.

License

This project is licensed under the MIT License.

Author

Tyler Nielsen

Version History

1.0.0 (2023-09-24): Initial release

Changelog

1.2.0

8 months ago

1.1.0

8 months ago

1.0.0

8 months ago