hatsu-says

A debug tool

Usage no npm install needed!

<script type="module">
  import hatsuSays from 'https://cdn.skypack.dev/hatsu-says';
</script>

README

says

A light and simple debug tool.

Downloads Version License

Highlights

  • A debug tool.

Install

$ npm install says

Usage

Simple

import { Says } from 'hatsu-says'
import { greys, palette } from 'spettro'

const castList = {
  client: palette.red.base,
  server: palette.purple.base,
  stranger: greys.grey.base
}

const debug = Says.build(castList)

debug.says('client', '\'Shakespeare\'')
debug.says('server', '\'Dickens\'')

Factorial with pipeline operator

import { Says } from 'hatsu-says'
import { greys, palette } from 'spettro'

const castList = {
  client: palette.red.base,
  server: palette.purple.base,
  stranger: greys.grey.base
}

const debug = Says.build(castList)
const says = {
  client: debug.credit('chef'),
  server: debug.credit('aboyeur')
}
'Shakespeare' |> says.client
'Dickens' |> says.server

License

MIT

Copyright (y) 2019-present, Haoyang (Vincent) Wang