diff options
| author | Priyansh <[email protected]> | 2020-12-22 17:50:12 +0530 |
|---|---|---|
| committer | Priyansh <[email protected]> | 2020-12-22 17:50:12 +0530 |
| commit | 22dc033f4938d6a19e086a1cbd36ec5cade5eaab (patch) | |
| tree | 9feb963ccd5c1581e676e41004801abc67db3357 /node_modules/core-js/modules/es.string.ends-with.js | |
| parent | e93da8b04da86773247aadb1cbb1912e4f4526b2 (diff) | |
| download | styx-22dc033f4938d6a19e086a1cbd36ec5cade5eaab.tar.xz styx-22dc033f4938d6a19e086a1cbd36ec5cade5eaab.zip | |
Remove node_modules
Diffstat (limited to 'node_modules/core-js/modules/es.string.ends-with.js')
| -rw-r--r-- | node_modules/core-js/modules/es.string.ends-with.js | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/node_modules/core-js/modules/es.string.ends-with.js b/node_modules/core-js/modules/es.string.ends-with.js deleted file mode 100644 index e19b0f6..0000000 --- a/node_modules/core-js/modules/es.string.ends-with.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; -var $ = require('../internals/export'); -var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f; -var toLength = require('../internals/to-length'); -var notARegExp = require('../internals/not-a-regexp'); -var requireObjectCoercible = require('../internals/require-object-coercible'); -var correctIsRegExpLogic = require('../internals/correct-is-regexp-logic'); -var IS_PURE = require('../internals/is-pure'); - -var nativeEndsWith = ''.endsWith; -var min = Math.min; - -var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('endsWith'); -// https://github.com/zloirock/core-js/pull/702 -var MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () { - var descriptor = getOwnPropertyDescriptor(String.prototype, 'endsWith'); - return descriptor && !descriptor.writable; -}(); - -// `String.prototype.endsWith` method -// https://tc39.github.io/ecma262/#sec-string.prototype.endswith -$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, { - endsWith: function endsWith(searchString /* , endPosition = @length */) { - var that = String(requireObjectCoercible(this)); - notARegExp(searchString); - var endPosition = arguments.length > 1 ? arguments[1] : undefined; - var len = toLength(that.length); - var end = endPosition === undefined ? len : min(toLength(endPosition), len); - var search = String(searchString); - return nativeEndsWith - ? nativeEndsWith.call(that, search, end) - : that.slice(end - search.length, end) === search; - } -}); |
