trueban-processor

0.1.6 • Public • Published

trueban-processor

my first-rate project

如何使用

首先,我们需要有一个library对象:

const library = {
  'sentence': [
    "Hi! I'm Lily.",
    "Hi! I'm Michael."
    ],
    'word': ["a", "b"]
    }

接下来,初始化tsl

  const tsl = new Processor(library)

lyric格式

假如有一个lyric文本

const lyric = `knock knock hello
====
Hello! (Hello!) 你好,你好!**2
Come in. 请进
Let’s sing. 让我们一起歌唱
Let’s play. 让我们一起游戏`

则输入

  const { parsed , processed } = tsl.compile(lyric,{processor:'lyric'})

list格式

假如我们有一个list文本

const list = `{{library:word}}
^^a
b
===
Hi! I'm Lily.
Hi! I'm Michael.
`

则输入

  const { parsed , processed } = tsl.compile(list)

默认processor为list.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

trueban-processor © wanthering, Released under the MIT License.

GitHub @wanthering

Readme

Keywords

none

Package Sidebar

Install

npm i trueban-processor

Weekly Downloads

1

Version

0.1.6

License

MIT

Unpacked Size

17.7 kB

Total Files

3

Last publish

Collaborators

  • wanthering