feat: refactoring project
This commit is contained in:
7
node_modules/webpack/lib/util/propertyAccess.js
generated
vendored
7
node_modules/webpack/lib/util/propertyAccess.js
generated
vendored
@@ -5,10 +5,7 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
const {
|
||||
SAFE_IDENTIFIER,
|
||||
RESERVED_IDENTIFIER
|
||||
} = require("../util/propertyName");
|
||||
const { SAFE_IDENTIFIER, RESERVED_IDENTIFIER } = require("./propertyName");
|
||||
|
||||
/**
|
||||
* @param {ArrayLike<string>} properties properties
|
||||
@@ -19,7 +16,7 @@ const propertyAccess = (properties, start = 0) => {
|
||||
let str = "";
|
||||
for (let i = start; i < properties.length; i++) {
|
||||
const p = properties[i];
|
||||
if (`${+p}` === p) {
|
||||
if (`${Number(p)}` === p) {
|
||||
str += `[${p}]`;
|
||||
} else if (SAFE_IDENTIFIER.test(p) && !RESERVED_IDENTIFIER.has(p)) {
|
||||
str += `.${p}`;
|
||||
|
||||
Reference in New Issue
Block a user