1.4.1 • Published 1 year ago
dollor v1.4.1
what can i do?
I help you to save your money ok?
how?
- I can show all the money you have
- I can help you manage your money better
- Control over withdrawals and deposits with date
- Report all money changes with the date of that day
init a project
you have to do:
- create a sample.js file
- create a bank folder
- create a bank.$ file in bank folder
- create a out.json file in bank folder
How to use
#setup
first you should require the package in sample.js
const Dollor = require('dollor');
// or
import Dollor from 'dollor';
// or
import { Dollor as compiler } from "dollor";
then you have to do this:
const compiler = new Dollor({
input: 'bank/bank.$',
output:'bank/out.json'
});
compiler.compile();
note that in input just put .$ file
note that in output just put .json file
#syntax
in *.$ files you should follow this syntax
$(date) {
#comment
+ int;
- int;
}
in the date you can write any you want but its better to Enter the date to manage it ease
for example:
$(2024/4/5) { # i go to change my phone + 1,000; # Cell my phone - 1,500; # Buy a phone } $(2024/4/6) { + 60,000; # Cell my car - 500; }
and at end you should run the sample.js file with nodejs
node sample.js
out.js
{
"name":"bank.$",
"$": 59000,
"history": {
"2024/4/5": -500,
"2024/4/6": 59500
}
}
details:
- name: name of the file passed to the compiler
- $: money you currently have
- history: Your amount of money after each day