dabnpm install @s9a/dab
const dab = require("@s9a/dab")
dab(deets, callback=dab.terse)
deetsfrom is a filename or color format
"#dab"png gif tif jpg webp svgrgb hsl with commasto is the filename to save to
[from]_[shape].pngpng tif jpg webpshape is desired dimensions in pixels
960 aka "960" aka "960x960" aka [960, 960]dab({
from: "#bae",
to: "bae.png",
shape: "1280x640",
})
dab({
from: "foto.jpg",
to: "foto.webp",
shape: "1280x640",
})
callbackcallback may be custom or presetcallback defaults to dab.tersedab({})
dab({}, dab.verbose)
dab({}, (err, did) => {
if (err) throw err
console.log(did)
})
dab.verbose verbose infodab.terse terse infodab.quiet only warnings or errorsdab.silent nothingdab [from] [to] [shape]
from can be a filename or color formatto can be a filenamewidthxheight or just width for square"#000" '#000' \#000 "rgb(0, 0, 0)" "black" 'black' black#000 rgb(0, 0, 0)#bed as bed as shorthand but not like b3d--help--silent--quiet--terse default--verbosenode npm npxnode installers provide node npm npx
versions are checkable via your command line
node -v
npm -v
npx -v
npx lets you dab on the fly with the scoped package name @s9a/dabnpx @s9a/dab "#dab" dab.png 1280
npx @s9a/dab "#dab" dab.png 1280x640
npx @s9a/dab "lime" 1280
npx @s9a/dab "lime" 1280x640
npx @s9a/dab "rgb(0, 255, 0)" 1280x640
@s9a/dab as a project dependencypackage.json via npm init or manuallynpm install @s9a/dab
npx dab "#dab" dab.png 1280
npx dab "#dab" dab.png 1280x640
npx dab "lime" 1280
npx dab "lime" 1280x640
npx dab "rgb(0, 255, 0)" 1280x640
git clone git@github.com:s9a/dab.git #team
git clone https://github.com/s9a/dab.git #guest
cd dab
npm install
npm test
npx . "#dab" dab.png 1280
npx . "#dab" dab.png 1280x640
npx . "lime" 1280
npx . "lime" 1280x640
npx . "rgb(0, 255, 0)" 1280x640
dab as global command--unsafe-perm to build dependenciesnpm install @s9a/dab --global #admin
sudo npm install @s9a/dab --global #user
dab "#dab" dab.png 1280
dab "#dab" dab.png 1280x640
dab "lime" 1280
dab "lime" 1280x640
dab "rgb(0, 255, 0)" 1280x640
npm uninstall @s9a/dab --global