UNPKG

joseph.db

Version:
33 lines (27 loc) 666 B
# Importing ```js // ES6 Import import DataBase from 'joseph.db'; // Node module Import const Database = require('joseph.db'); ``` # Create database ### Usage: ```js Database(dataName, dataKey, options); ``` ### Example: ```js const myData = Database('settings', 'language', { defaultData: 'English', // Default data autoCheck: true, // Set the data when there is no data }); ``` # Methods ```js myData.set(newData); // Setting the data. myData.get(); // Get the data in the key. myData.has(); // There are data in the key. myData.clear(); // Set the data to default data. myData.delete(); // Delete the data in the key. ```