String.prototype.startsWith
v1.0.1
String.prototype.startsWith polyfill String.prototype.startsWith方法的穩健且優化的多填充6。
該軟件包實現了ES-SHIM API接口。它在ES3支持的環境中起作用,並符合規格。
還有其他用於String.prototype.startsWith多填充。
通過NPM:
npm install string.prototype.startswith然後,在node.js中:
var startsWith = require ( 'string.prototype.startswith' ) ;在瀏覽器中:
< script src =" https://bundle.run/string.prototype.startswith " > </ script >注意:建議您使用
npm等軟件包管理器安裝此模塊,因為從cdn(例如bundle.run)加載多個多填充物將導致重複的代碼。
polyfills + for String.prototype.endsWith and String.prototype.contains也可以使用polyfills +測試套件。
在main分支上,凸起package.json中的版本號:
npm version patch而不是patch ,請根據需要使用minor或major 。
請注意,這會產生一個git commit + tag。
推動發布提交和標籤:
git push && git push --tags然後,我們的CI自動將新版本發佈到NPM。
| Mathias Bynens |
該多填充可根據MIT許可獲得。