From e24d1d20d65afadae9d33592024ce0ee7a3f4627 Mon Sep 17 00:00:00 2001 From: Akhil Marsonya Date: Wed, 24 Mar 2021 23:16:34 +0530 Subject: [PATCH] path: refactor to use more primordials --- lib/path.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/path.js b/lib/path.js index f3d7f42fc1f433..6001b0ba8301a7 100644 --- a/lib/path.js +++ b/lib/path.js @@ -163,7 +163,7 @@ const win32 = { // Verify that a cwd was found and that it actually points // to our drive. If not, default to the drive's root. if (path === undefined || - (StringPrototypeSlice(path, 0, 2).toLowerCase() !== + (StringPrototypeToLowerCase(StringPrototypeSlice(path, 0, 2)) !== StringPrototypeToLowerCase(resolvedDevice) && StringPrototypeCharCodeAt(path, 2) === CHAR_BACKWARD_SLASH)) { path = `${resolvedDevice}\\`; @@ -1321,7 +1321,7 @@ const posix = { return StringPrototypeSlice(path, startDot, end); }, - format: _format.bind(null, '/'), + format: FunctionPrototypeBind(_format, null, '/'), parse(path) { validateString(path, 'path');