Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ module.exports = {
"error",
{
"array": false,
"object": false
"object": true
}
],
"prefer-numeric-literals": "error",
Expand Down
2 changes: 1 addition & 1 deletion src/addons/matchrecursive.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default (XRegExp) => {
const sticky = flags.includes('y');
// Flag `y` is controlled internally
const basicFlags = flags.replace(/y/g, '');
let escapeChar = options.escapeChar;
let {escapeChar} = options;
const vN = options.valueNames;
const output = [];
let openTokens = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/xregexp.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const correctExecNpcg = nativ.exec.call(/()??/, '')[1] === undefined;
// Check for ES6 `flags` prop support
const hasFlagsProp = /x/.flags !== undefined;
// Shortcut to `Object.prototype.toString`
const toString = {}.toString;
const {toString} = {};

function hasNativeFlag(flag) {
// Can't check based on the presence of properties/getters since browsers might support such
Expand Down Expand Up @@ -1501,7 +1501,7 @@ fixed.replace = function(search, replacement) {

if (isRegex) {
if (search[REGEX_DATA]) {
captureNames = search[REGEX_DATA].captureNames;
({captureNames} = search[REGEX_DATA]);
}
// Only needed if `search` is nonglobal
origLastIndex = search.lastIndex;
Expand Down