mathjs
Version:
Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with dif
23 lines (18 loc) • 390 B
JavaScript
const n1 = 'number'
const n2 = 'number, number'
export function notNumber (x) {
return !x
}
notNumber.signature = n1
export function orNumber (x, y) {
return !!(x || y)
}
orNumber.signature = n2
export function xorNumber (x, y) {
return !!x !== !!y
}
xorNumber.signature = n2
export function andNumber (x, y) {
return !!(x && y)
}
andNumber.signature = n2