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 @@ -248,7 +248,7 @@ module.exports = {
"prefer-destructuring": [
"error",
{
"array": false,
"array": true,
"object": true
}
],
Expand Down
4 changes: 2 additions & 2 deletions src/xregexp.js
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ function XRegExp(pattern, flags) {
pos += (result.matchLength || 1);
} else {
// Get the native token at the current position
const token = XRegExp.exec(appliedPattern, nativeTokens[scope], pos, 'sticky')[0];
const [token] = XRegExp.exec(appliedPattern, nativeTokens[scope], pos, 'sticky');
output += token;
pos += token.length;
if (token === '[' && scope === defaultScope) {
Expand Down Expand Up @@ -1525,7 +1525,7 @@ fixed.replace = function(search, replacement) {
// Change the `args[0]` string primitive to a `String` object that can store
// properties. This really does need to use `String` as a constructor
args[0] = new String(args[0]);
groupsObject = args[0];
[groupsObject] = args;
}

// Store named backreferences
Expand Down
4 changes: 2 additions & 2 deletions tools/scripts/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ const createBmpRange = (r, {addBrackets} = {addBrackets: true}) => {
if (r.length === 0) {return '';}

const buf = [];
let start = r[0];
let end = r[0];
let [start] = r;
let [end] = r;
let predict = start + 1;
r = r.slice(1);

Expand Down