dab

node usage

npm install @s9a/dab
const dab = require("@s9a/dab")
dab(deets, callback=dab.terse)

deets

properties

create png from color

dab({
  from: "#bae",
  to: "bae.png",
  shape: "1280x640",
})

convert jpg to webp

dab({
  from: "foto.jpg",
  to: "foto.webp",
  shape: "1280x640",
})

callback

dab({})
dab({}, dab.verbose)
dab({}, (err, did) => {
  if (err) throw err
  console.log(did)
})

callback presets

CLI

syntax

dab [from] [to] [shape]

hexes

flags

node npm npx

node installers provide node npm npx

versions are checkable via your command line

node -v
npm -v
npx -v

CLI examples

temporary

npx @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

project

npm 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

clone

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

global

npm 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

uninstall whenever

npm uninstall @s9a/dab --global