This package has been deprecated

Author message:

no longer maintainence

@chatopera/ms-parser

1.2.6 • Public • Published

Build Status Coverage Status Code Climate

ss-parser

SuperScript parser is the interface for reading *.ss files and creating a internal representation for the SuperScript dialogue engine.

More information can be found at superscriptjs.com

API

  • parseDirectory(path, options, callback)

Takes a directory path and parses all the *.ss files in the directory, creating a JSON structure which is passed into callback as callback(err, results). The options parameter is an object that can accept a factSystem for use in trigger and reply expansion, and a cache to skip previously parsed files in a directory.

options.lang supports en_US and zh_CN, default is en_US.

  • parseFile(path, factSystem, lang, callback)

Like loadDirectory, but parses a single *.ss file. lang supports 'en_US' and 'zh_CN'.

  • parseContents(path, factSystem, lang, callback)

Like parseFile, but parses a string (i.e. the contents of a single file).

lang supports 'en_US' and 'zh_CN'.

  • normalizeTrigger(trigger, factSystem, callback)

Takes a trigger string (for example, 'I like * and *~1, but not [cats|dogs].') and generates the regex for the trigger, which is passed into callback as callback(err, cleanedTrigger).

Readme

Keywords

none

Package Sidebar

Install

npm i @chatopera/ms-parser

Weekly Downloads

9

Version

1.2.6

License

MIT

Unpacked Size

43.2 kB

Total Files

12

Last publish

Collaborators

  • chatopera
  • hain
  • mukaiu
  • succpeking