俳句用に字数をカウントする関数
これは クソアプリ Advent Calendar 2019の 19 日目の記事である、ビルド時に俳句を読めるプラグイン のために開発されたものです。
$ yarn add js-word-count-for-haiku
const countWord = require("js-word-count-for-haiku").default;
const c = countWord("コンソール");
console.log(c); // => 5
モジュールインストール
$ yarn install
テスト
$ yarn run testt
本番用ビルド
$ yarn run build:pr
公開前にドライラン
$ tar -tf $(npm pack)
npm に公開
$ npm publish