madlibify:用于创建类似 madlibs 的游戏的简单模块

时间:2021-06-17 21:42:58
【文件属性】:
文件名称:madlibify:用于创建类似 madlibs 的游戏的简单模块
文件大小:2KB
文件格式:ZIP
更新时间:2021-06-17 21:42:58
JavaScript 疯狂化 创建您自己的文字游戏! 使用 var mads = require ( 'madlibify' ) ; var text = "The quick {{color1}} {{noun1}} jumps over the lazy {{noun2}}" ; // Parse out the fill-in-the-blanks var blanks = mads . parse ( text ) ; console . log ( blanks ) ; // ["color1", "noun1", "noun2"] // Fill in the blanks! var serious = { color1 : 'brown' , noun1 : 'fox' , noun2 : 'dog' } ; var madlibs = mads . compile ( text
【文件预览】:
madlibify-master
----.gitignore(14B)
----package.json(423B)
----index.js(417B)
----README.md(737B)
----test()
--------index.js(921B)

网友评论