Skip to content

Ikagaka/sakurascript-executer.js

Repository files navigation

npm npm license npm download total npm download by month

Dependency Status devDependency Status Travis Build Status AppVeyor Build Status codecov.io Code Climate Codacy Badge Greenkeeper badge

さくらスクリプト実行機(イベントエミッタ)

さくらスクリプトの待ち時間を適切に管理し、トークンごとにイベントを発行します。

Install

npm:

npm install sakurascript sakurascript-executer

Usage

import {SakuraScriptExecuter} from 'sakurascript-executer';
import {SakuraScriptToken} from 'sakurascript';
const sakurascript_executer = new SakuraScriptExecuter({talk_wait: 100});
sakurascript_executer.on('execute', (token) => {
  if (token instanceof SakuraScriptToken.Char) process.stdout.write(token.char);
});
sakurascript_executer.execute("\\h\\s[0]\\u\\s[10]Hello world!\\e");

API

API Document

License

This is released under Zlib License.