文件名称:Pattern_Match_JS:js中简单的模式匹配库
文件大小:2KB
文件格式:ZIP
更新时间:2024-06-24 09:54:34
JavaScript
Yiyi Wang (shd101wyy) 的简单模式匹配库 如何使用? 节点.js var pm = require ( "pm.js" ) ; 浏览器 < script src = "pm.js" > < / script > 例子 pm . match ( 12 , pm . var ( "x" ) ) // => {"x": 12} pm . match ( "Hello" , pm . var ( "x" ) ) // => {"x": "Hello"} pm . match ( "A" , "B" ) // => false, as not match pm . match ( [ "age" , 12 ] , [ "age" , pm . var ( "my-age" ) ] ) // => {"my-age": 12} pm
【文件预览】:
Pattern_Match_JS-master
----pm.js(2KB)
----unittest()
--------test.js(698B)
----README.md(657B)