jsmodern
Version:
An extension to existing JavaScript, influenced by other great languages such as Rust, Dart, Java, Golang, etc.
15 lines • 442 B
JavaScript
export function utilDivFloor(a, b) {
return Math.floor(a / b);
}
export const divFloor = {
label: 'divFloor',
fn: function numberDivFloor(divisor) {
const ctx = this;
const x = Number(divisor);
if (!x) {
throw new TypeError(`Invalid 'divisor'. The value must be a number that is greater than zero`);
}
return utilDivFloor(ctx, x);
},
};
//# sourceMappingURL=div-floor.js.map