X-Git-Url: https://git.josue.xyz/?p=dotfiles%2F.git;a=blobdiff_plain;f=.config%2Fcoc%2Fextensions%2Fnode_modules%2Fcoc-prettier%2Fnode_modules%2Fcore-js%2Finternals%2Fstring-trim.js;h=7fc16558dfaba3009f3b6cb93e05e629e696ef15;hp=9086f1a9d5f0b49e1ef048975eb00755e7d3ed89;hb=3be0a9efc698a9570a44456009afc6014812625a;hpb=d2f432cc757f42f0318fdddcab8c00b240d47088 diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/core-js/internals/string-trim.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/core-js/internals/string-trim.js index 9086f1a9..7fc16558 100644 --- a/.config/coc/extensions/node_modules/coc-prettier/node_modules/core-js/internals/string-trim.js +++ b/.config/coc/extensions/node_modules/coc-prettier/node_modules/core-js/internals/string-trim.js @@ -1,6 +1,9 @@ +var uncurryThis = require('../internals/function-uncurry-this'); var requireObjectCoercible = require('../internals/require-object-coercible'); +var toString = require('../internals/to-string'); var whitespaces = require('../internals/whitespaces'); +var replace = uncurryThis(''.replace); var whitespace = '[' + whitespaces + ']'; var ltrim = RegExp('^' + whitespace + whitespace + '*'); var rtrim = RegExp(whitespace + whitespace + '*$'); @@ -8,9 +11,9 @@ var rtrim = RegExp(whitespace + whitespace + '*$'); // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation var createMethod = function (TYPE) { return function ($this) { - var string = String(requireObjectCoercible($this)); - if (TYPE & 1) string = string.replace(ltrim, ''); - if (TYPE & 2) string = string.replace(rtrim, ''); + var string = toString(requireObjectCoercible($this)); + if (TYPE & 1) string = replace(string, ltrim, ''); + if (TYPE & 2) string = replace(string, rtrim, ''); return string; }; };