Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
libs: remove redundant RegExp parts
  • Loading branch information
vsemozhetbyt committed Jun 7, 2017
commit a48371ca8720b4ba5d4d66e122d1c6b583349f17
2 changes: 1 addition & 1 deletion lib/dns.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ function setServers(servers) {
// servers cares won't have any servers available for resolution
const orig = cares.getServers();
const newSet = [];
const IPv6RE = /\[(.*)\](?::\d+)?/;
const IPv6RE = /\[(.*)\]/;
const addrSplitRE = /:\d+$/;

servers.forEach((serv) => {
Expand Down
4 changes: 2 additions & 2 deletions lib/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ function complete(line, callback) {
const exts = Object.keys(this.context.require.extensions);
var indexRe = new RegExp('^index(' + exts.map(regexpEscape).join('|') +
')$');
var versionedFileNamesRe = /-\d+\.\d+(\.\d+)?/;
var versionedFileNamesRe = /-\d+\.\d+/;

completeOn = match[1];
var subdir = match[2] || '';
Expand Down Expand Up @@ -1068,7 +1068,7 @@ REPLServer.prototype.memory = function memory(cmd) {
self.lines.level.push({
line: self.lines.length - 1,
depth: depth,
isFunction: /\s*function\s*/.test(cmd)
isFunction: /\bfunction\b/.test(cmd)
});
} else if (depth < 0) {
// going... up.
Expand Down