Skip to content

codingLemonzz/aLocalDBForJavaScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 

Repository files navigation

a data manage tool for javascript

This is a data manage tool for javascript, it can easily manage your data in javascript.

2018.08.21 update:

matching the ES6 javascript grammar.

function:

set Data

1. localDB.set(key,value);

The key must be type of string, and the value can be any object or even a function.

2. localDB.arrSet(arr);

The input args must be an array,otherwise it will not run.And the args of this function must be a two-dimensional array like: [[key1,value1],[key2,value2],....]

get Data

3. localDB.get(key);

The key must be type of string, the return of this function is an object or a function.If it's a fuction,you can trigger the function like this:(localDB.get('function name'))();

4. localDB.arrGet(arr);

The input args must be an array,otherwise it will return an empty array.And the return of this function is a two-dimensional array.

5. localDB.getLike(likeKey);

The input args must be a string,and this function can find all the key like the likeKey in the data pool.The return of this function is a two-dimensional array.But I tend you to use advanced search.

6. localDB.getAll();

The return of this function is a two-dimensional array,the type of every element of this array is like this:[key,value]

delete data

7. localDB.delete(key);

The key must be type of string.

8. localDB.arrDelete(arr);

The arr must be an array.And the args in arr is the key that you want to delete.

9. localDB.deleteAll();

This function will delete all date.

10. localDB.minSet(key,value,millisecond);

The key must be type of string, and the value can be any object,the millisecond must be a number.
This function can set a value where have the lifecycle,it depends on the millisecond.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published