jamies-simplejs
v4.0.0
Published
A simple JavaScript utility toolkit
Readme
SimpleJS
A simple JavaScript utility toolkit for printing, DOM manipulation, CSS control, math, and more.
📦 Installation
npm install simplejs
Usage:
const SimpleJS = require("simplejs");
Print System:
SimpleJS.print.print("Hello world");
SimpleJS.print.printFlex("A", "B", "C");
SimpleJS.print.WMprint("Watermark text");
Status System:
SimpleJS.status.errorState("Something went wrong");
SimpleJS.status.warningState("Be careful");
SimpleJS.status.logInfo("Info message");
Console Tools:
SimpleJS.consoleTools.clearConsole();
SimpleJS.consoleTools.smartClear();
Math Tools:
SimpleJS.math.addTwoArgs(2, 3);
SimpleJS.math.subTwoArgs(5, 2);
SimpleJS.math.multTwoArgs(3, 4);
SimpleJS.math.divTwoArgs(10, 2);
SimpleJS.math.expoTwoArgs(2, 3);
SimpleJS.math.modTwoArgs(10, 3);
Compare Tools:
SimpleJS.compare.lessThan(2, 5);
SimpleJS.compare.greaterThan(10, 3);
DOM Tools:
let box = SimpleJS.dom.getElement("#box");
SimpleJS.dom.setText(box, "Hello!");
SimpleJS.dom.setStyle(box, "color", "red");
SimpleJS.dom.onClick(box, () => {
console.log("Clicked!");
});
CSS Tools:
SimpleJS.css.setElementByCSS(box, "backgroundColor", "blue");
SimpleJS.css.setMultipleElementsByCSS(box, {
width: "100px",
height: "100px"
});
Extra Info:
SimpleJS.extraInfo.ownerOfLibrary();
SimpleJS.extraInfo.shoutOuts();