String.prototype.startsWith polyfill polyfill قوي ومحسّن لطريقة String.prototype.startsWith في ECMASCRIPT 6.
هذه الحزمة تنفذ واجهة API ES-shim. إنه يعمل في بيئة مدعومة ES3 وتوافق مع المواصفات.
تتوفر polyfills الأخرى لـ 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 + أجنحة الاختبار لـ String.prototype.endsWith و String.prototype.contains متوفرة أيضًا.
في الفرع main ، اصطدم رقم الإصدار في package.json :
npm version patch بدلاً من patch ، استخدم minor أو major حسب الحاجة.
لاحظ أن هذا ينتج علامة GIT + علامة.
ادفع التزام الإصدار والعلامة:
git push && git push --tagsثم ينشر CI تلقائيًا الإصدار الجديد إلى NPM.
| ماتياس بيناز |
يتوفر هذا الصفيح بموجب ترخيص معهد ماساتشوستس للتكنولوجيا.