beginnerdatabase
v2.0.0
Published
Are you a beginner and want to use a simple database? This package is for you!
Downloads
239
Maintainers
Readme
BEGINNER DATABASE
- Are you a beginner and want to store variables? This package is for you!
Functions
setVar(VariableName, VariableValue, User) Sets Variable to Value. User is optional, it could be empty or provide an string.
fetchVar(VariableName, User) Gets VariableName's value, User is optional
createVar(VariableName) Creates an variable with name VariableName.
deleteVar(VariableName)
Example(s)
const db = require('beginnerdatabase'); // Needed
db.createVar('test') // Creates a variable named 'test'
db.setVar('test', 'Hello There!') // Sets "test" variable's value to "Hello There!"
console.log(db.fetchVar('test')) // Returns "Hello There!"
const db = require('beginnerdatabase'); // Needed
db.createVar('money') // Creates a variable named 'test'
db.setVar('money', '100', 'global') // Sets money variable to 100 for global
db.setVar('money', '100000', 'owner') // Sets money variable to 10000 for owner
console.log("Global Money: " + db.fetchVar('money', 'global'))
console.log("Owner Money: " + db.fetchVar('money', 'global'))