Package Exports
- @vorlefan/pathdb
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@vorlefan/pathdb) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
PathDB
WORK IN PROGRESS
Easy and small database created around the JSON structure
With npm do:
npm install @vorlefan/pathdbWith yarn do:
yarn add @vorlefan/pathdbDocumentation
You can access on the folder 'docs' of this repository A better documentation will be made at the near future.
Highlight
- Create Models
- Valid Models
- Simple Query from Models
- Easy to use and setup
- Cache can be done with localStorage
- Save temp files as a alternative backup
Example
Please, take a look at the 'example' folder of this repository
// model.ts
import { PathModel } from '../src';
const Model = new PathModel({
modelName: 'db_create',
routeName: 'main',
});
describe('Model', () => {
test('Basic', async () => {
await Model.model();
const created = await Model.created();
expect(created).toBe(true);
});
test('Read', async () => {
const content = await Model.read();
expect(typeof content === 'object').toBe(true);
});
});