ect-maths-service-js
v1.21.6
Published
A JavaScript-first maths utility library
Readme
EctMathsService JS
ect-maths-service-js provides lightweight arithmetic helpers and a service class for Vanilla JS and React usage.
Build
npm run build:ect-maths-service-jsVanilla JS
import {
add,
subtract,
multiply,
divide,
EctMathsServiceJs
} from 'ect-maths-service-js';
console.log(add(4, 6)); // 10
console.log(divide(20, 5)); // 4
const maths = new EctMathsServiceJs();
console.log(maths.multiply(3, 7)); // 21React
import { add, multiply } from 'ect-maths-service-js';
export function MathsSummary() {
const total = add(8, 12);
const scaled = multiply(total, 2);
return <div>Total: {total}, Scaled: {scaled}</div>;
}API
Functions:
add(number1, number2)subtract(number1, number2)multiply(number1, number2)divide(number1, number2)
Class/helpers:
EctMathsServiceJscreateEctMathsServiceJs()
Dependencies
- No framework dependency at runtime
Further help
- https://angular-grid.net/
Licence
The licence agreement for this paid component can be found here:
- https://angular-grid.net/assets/licence/licence_agreement.txt
