thaj
as in "Thanos JS", just (the exceptionally perfect) half of it
This package allows you to use the powers of evil people with mythical golden gauntlets to erase half of pretty much whatever* you want.
* as long as it is divisible (it keeps fractions intact)
Installation
npm i thaj
Usage
In scripts
Note: Results may vary.
const Thanos = const thanos = thanos // 'tnee'thanos // <Buffer 77 20 6f 6b> => 'w ok' thanos // 21thanos // 10 or 11thanos // 1.1415926535897931 or 2.141592653589793 thanos // [2] or [5] // you can also pass in multiple values:thanos
You can also optionally apply a custom RNG for your own grain
of randomness (GeneratorFunction
s
are also supported)!
Just make sure that its values range from 0 to 1 (excluding 1) like in Math.random
.
// change the default for all instancesThanosDEFAULT_RNG = myCustomRNG // change it for once instancethanosrng = myCustomRNG
On the command line
The CLI variant thanos
essentially works like the unix command
cat
, just half as good.
$ echo "Stark Tower" > /tmp/starktower.txt$ thanos /tmp/starktower.txttakToe $ thanos -Captain Americapanmerca