From 26fa49f4b0aa658d65a21fffe828f39e78302573 Mon Sep 17 00:00:00 2001 From: HelenHuang <LinHuang@pollex.com.tw> Date: 星期四, 09 六月 2022 17:46:58 +0800 Subject: [PATCH] Revert "Update#139889 [ 快速篩選 ] 年資文案調整" --- PAMapp/node_modules/core-js/internals/get-substitution.js | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/PAMapp/node_modules/core-js/internals/get-substitution.js b/PAMapp/node_modules/core-js/internals/get-substitution.js index 1851c7e..60ad4dc 100644 --- a/PAMapp/node_modules/core-js/internals/get-substitution.js +++ b/PAMapp/node_modules/core-js/internals/get-substitution.js @@ -1,7 +1,10 @@ +var uncurryThis = require('../internals/function-uncurry-this'); var toObject = require('../internals/to-object'); var floor = Math.floor; -var replace = ''.replace; +var charAt = uncurryThis(''.charAt); +var replace = uncurryThis(''.replace); +var stringSlice = uncurryThis(''.slice); var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g; var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g; @@ -15,15 +18,15 @@ namedCaptures = toObject(namedCaptures); symbols = SUBSTITUTION_SYMBOLS; } - return replace.call(replacement, symbols, function (match, ch) { + return replace(replacement, symbols, function (match, ch) { var capture; - switch (ch.charAt(0)) { + switch (charAt(ch, 0)) { case '$': return '$'; case '&': return matched; - case '`': return str.slice(0, position); - case "'": return str.slice(tailPos); + case '`': return stringSlice(str, 0, position); + case "'": return stringSlice(str, tailPos); case '<': - capture = namedCaptures[ch.slice(1, -1)]; + capture = namedCaptures[stringSlice(ch, 1, -1)]; break; default: // \d\d? var n = +ch; @@ -31,7 +34,7 @@ if (n > m) { var f = floor(n / 10); if (f === 0) return match; - if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); + if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1); return match; } capture = captures[n - 1]; -- Gitblit v1.8.0