starts-with:如果给定的字符串或数组以严格相等的前缀开始,则返回“ true”。 使用http中最快的实现

时间:2021-05-22 13:53:30
【文件属性】:
文件名称:starts-with:如果给定的字符串或数组以严格相等的前缀开始,则返回“ true”。 使用http中最快的实现
文件大小:14KB
文件格式:ZIP
更新时间:2021-05-22 13:53:30
JavaScript 如果给定的字符串或数组以严格相等的前缀开头,则返回true 。 使用最快的实施。 安装 npm i starts-with --save npm test 用法 有关更多用例,请参见 var startsWith = require ( 'starts-with' ) startsWith ( 'abcdefghi' , 'abcd' ) //=> true startsWith ( [ 'abc' , 'def' , 'ghi' ] , 'abc' ) //=> true startsWith ( [ 'abc' , 'def' , 'ghi' ] , [ 'abc' ] ) //=> false startsWith ( [ 'cab' , 'cdf' , 'cef' ] , 'c' ) //=> false startsWith ( [ 57 , 'a' , 'b' ] , 57
【文件预览】:
starts-with-master
----test.js(3KB)
----benchmark()
--------fixtures()
--------code()
--------implementations-browser.js(1KB)
--------index.js(168B)
----CONTRIBUTING.md(1KB)
----.travis.yml(347B)
----LICENSE.md(1KB)
----README.md(4KB)
----.editorconfig(397B)
----.gitignore(615B)
----index.js(651B)
----CHANGELOG.md(621B)
----package.json(861B)

网友评论