path: refactor to use more primordials · nodejs/node@a94cc27

@@ -163,7 +163,7 @@ const win32 = {

163163

// Verify that a cwd was found and that it actually points

164164

// to our drive. If not, default to the drive's root.

165165

if (path === undefined ||

166-

(StringPrototypeSlice(path, 0, 2).toLowerCase() !==

166+

(StringPrototypeToLowerCase(StringPrototypeSlice(path, 0, 2)) !==

167167

StringPrototypeToLowerCase(resolvedDevice) &&

168168

StringPrototypeCharCodeAt(path, 2) === CHAR_BACKWARD_SLASH)) {

169169

path = `${resolvedDevice}\\`;

@@ -1321,7 +1321,7 @@ const posix = {

13211321

return StringPrototypeSlice(path, startDot, end);

13221322

},

132313231324-

format: _format.bind(null, '/'),

1324+

format: FunctionPrototypeBind(_format, null, '/'),

1325132513261326

parse(path) {

13271327

validateString(path, 'path');