dance-comment
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

English | 简体中文

dance-comment

  • example (default) avatar
  • use
import DanceComment from 'dance-comment'
new DanceComment().init()
const config = {
  time: 1000,
  useTemplate: true,
  orderPlay: false
}
new DanceComment(config).init()
  • example (javascript) avatar
  • use
import DanceComment from 'dance-comment'
import javascript from 'dance-comment/dist/template/javascript'
const config = {
  time: 200,
  useTemplate: false,
  template: javascript
}
new DanceComment(config).init()
  • parameter
name type default explain
time number 10000 replacement time MS (no replacement if less than 100ms)
useTemplate boolean true use the template provided by the plug-in
template array [] custom template
orderPlay boolean true whether to switch in order or not. False means random switching
config.template => array
[
  [
    '                 .--,       .--,                    ',
    '                ( (  \\.---./  ) )                   ',
    "                 '.__/o   o\\__.'                    ",
    '                    {=  ^  =}                       ',
    '                     >  -  <                        ',
    '                    /       "                       ',
    '                   //       \\\\                      ',
    '                  //|   .   |\\\\                     ',
    "                  '\\       /''_.-~^`'-.             ",
    "                     \\  _  /--'         `           ",
    '                   ___)( )(___                      ',
    '                  (((__) (__)))                     '
  ],
  [
    "           _._ _..._ .-',     _.._(`))             ",
    "          '-. `     '  /-._.-'    ',/              ",
    "             )         \\            '.             ",
    '            / _    _    |             "            ',
    '           |  a    a    /              |           ',
    '           \\   .-.                     ;           ',
    "            '-('' ).-'       ,'       ;            ",
    "               '-;           |      .'             ",
    '                  \\           \\    /               ',
    '                  | 7  .__  _.-\\   "               ',
    '                  | |  |  ``/  /`  /               ',
    '                 /,_|  |   /,_/   /                ',
    "                    /,_/      '`-'                 "
  ]
]

Package Sidebar

Install

npm i dance-comment

Weekly Downloads

15

Version

1.1.3

License

MIT

Unpacked Size

520 kB

Total Files

19

Last publish

Collaborators

  • zscz