/
buuded
/
app-web-project
Обзор
Документация
Войти
/
buuded
/
app-web-project
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
node_modules/string.prototype.trim/shim.js
20 строк
494 B
buuded
first-commit
27 янв 2025, 10:32
27 янв 2025, 10:32
9efc400
Код
Авторство
О чём код?
'use strict'; var supportsDescriptors = require('has-property-descriptors')(); var defineDataProperty = require('define-data-property'); var getPolyfill = require('./polyfill'); module.exports = function shimStringTrim() { var polyfill = getPolyfill(); if (String.prototype.trim !== polyfill) { if (supportsDescriptors) { defineDataProperty(String.prototype, 'trim', polyfill, true); } else { defineDataProperty(String.prototype, 'trim', polyfill); } } return polyfill; };