mirror of
https://github.com/Horizontal42/summarum.git
synced 2026-11-10 16:51:59 +03:00
Write plain text, get live results per line. English + Russian, units, live currency rates with crypto, percents, dates and timezones, bitwise ops, variables and sheet totals. Tauri 2 + TypeScript engine + CodeMirror 6; daily backups and a deleted-sheets bin. Inspired by Numi for macOS (numi.app); built from scratch for Windows.
21 lines
739 B
JavaScript
21 lines
739 B
JavaScript
// Summarum extension example.
|
|
// Drop .js files into this folder and restart the app.
|
|
// The API is compatible with Numi extensions: numi.setVariable,
|
|
// numi.addUnit, numi.addFunction.
|
|
|
|
// A global variable usable on any sheet, e.g. `salary * vat`
|
|
// numi.setVariable("vat", { "double": 20 });
|
|
|
|
// A custom unit: 1 floor = 3 meters, so `5 floors in meters` works
|
|
// numi.addUnit({
|
|
// "id": "floor",
|
|
// "phrases": "floor, floors, этаж, этажа, этажей",
|
|
// "baseUnitId": "meter",
|
|
// "format": "fl",
|
|
// "ratio": 3,
|
|
// });
|
|
|
|
// A custom function: hyp(3; 4) -> 5
|
|
// numi.addFunction({ "id": "hyp", "phrases": "hyp" }, function (values) {
|
|
// return { "double": Math.hypot(values[0].double, values[1].double) };
|
|
// });
|