avul.js - a very useless library
Why
To quote intergalactically famous fictional scientist and inventor Rick Sanchez,
The reason anyone would do this, if they could (which they can't), would be because they could (which they can't)
Instalation
npm install avul
Testing
Linux
sh test.sh
Windows
test.bat
Features
Function | |
---|---|
nothing() | returns null |
puts(e) | console.log(e) |
add(a,b) | returns a + b |
sub(a,b) | returns a - b |
mul(a,b) | returns a * b |
div(a,b) | returns a / b |
equals(a,b) | returns a == b |
Class(x) | creates a class |
is_isOdd(f) | returns true if f equals isOdd |
Example
const avul = require('avul'); mc = avul.Class(function (self, args) { self.a = args[0]; self.f = function () { return self.a * 2; }}) mo = new mc(5)avul.puts(avul.equals(avul.add(mo.f(), 8), 18))avul.puts(avul.nothing())avul.puts(avul.is_isOdd(isOdd))avul.puts(avul.is_isOdd(12345)) //=> true//=> null//=> true//=> false