talk-msg-dsl

Message DSL reader/writer of Jianliao.com ----

Usage no npm install needed!

<script type="module">
  import talkMsgDsl from 'https://cdn.skypack.dev/talk-msg-dsl';
</script>

README

Message DSL reader/writer of Jianliao.com

Usage

msgDsl = require 'msg-dsl'
msgBody = '<$mark|model|viewgt;'
result = msgDsl.read msgBody
msgDsl.write result

Methods:

  • read :: (string) -> array read DSL array from string
  • write :: (array) -> string write string from DSL array
  • writeHtml :: (array) -> string write HTML string from DSL array
  • recognize :: (string, string, array) -> array get DSL array from message text
  • flattern :: (array, array) -> string generate message text from DSL array
  • update :: (array, array) -> array update information in DSL array

License

Closed