8ball 中文文档教程
The Magic 8 Ball
Magic 8 Ball 是一种用于算命或寻求建议的玩具。
install:
$ npm i --save 8ball
usage:
const eightball = require('8ball')()
console.log(`do you need a new lease on life? ${eightball}`)
// do you need a new lease on life? it is decidedly so
cli:
8球还是????
$ npm i -g 8ball
$ 8ball 'will i be pretty?'
reply hazy, try again
$ 'will i be rich?'
concentrate and ask again
也接受标准输入:
$ echo 'will i be rich' | ????
please ask a question
(标准输入中没有 ?
匹配)
requirements:
node >=4
The Magic 8 Ball
The Magic 8 Ball is a toy used for fortune-telling or seeking advice.
install:
$ npm i --save 8ball
usage:
const eightball = require('8ball')()
console.log(`do you need a new lease on life? ${eightball}`)
// do you need a new lease on life? it is decidedly so
cli:
8ball or ????
$ npm i -g 8ball
$ 8ball 'will i be pretty?'
reply hazy, try again
$ ???? 'will i be rich?'
concentrate and ask again
also accepts stdin:
$ echo 'will i be rich' | ????
please ask a question
(no ?
match in stdin)
requirements:
node >=4
更多