String.prototype.trim:适用于String.prototype.trim的ES5规范的垫片

时间:2021-04-30 16:10:15
【文件属性】:
文件名称:String.prototype.trim:适用于String.prototype.trim的ES5规范的垫片
文件大小:17KB
文件格式:ZIP
更新时间:2021-04-30 16:10:15
javascript polyfill string ecmascript trim String.prototype.trim 符合ES5规范的String.prototype.trim填充程序。 如果不可用,请调用其“ shim”方法对String.prototype.trim进行填充。 该软件包实现了接口。 它可以在ES3支持的环境中工作,并符合规范( 和 )。 最常见的用法: var assert = require ( 'assert' ) ; var trim = require ( 'string.prototype.trim' ) ; assert ( trim ( ' \t\na \t\n' ) === 'a' ) ; trim . shim ( ) ; // will be a no-op if not needed assert ( trim ( ' \t\na \t\n' ) === ' \t\na \t\n' . trim ( ) ) ;
【文件预览】:
String.prototype.trim-main
----polyfill.js(276B)
----.eslintrc(299B)
----implementation.js(830B)
----index.js(385B)
----package.json(2KB)
----.github()
--------workflows()
----test()
--------shimmed.js(1KB)
--------implementation.js(608B)
--------index.js(426B)
--------tests.js(1KB)
----.nycrc(139B)
----LICENSE(1KB)
----.npmignore(640B)
----shim.js(330B)
----.gitignore(621B)
----CHANGELOG.md(15KB)
----.npmrc(55B)
----README.md(2KB)
----auto.js(36B)
----.eslintignore(10B)

网友评论