Skip to content

Commit

Permalink
Rollback "remove funks" change
Browse files Browse the repository at this point in the history
These functions are used in dependents.
  • Loading branch information
doowb committed Nov 6, 2019
1 parent 50e1d44 commit 75097dd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ const {
REGEX_SPECIAL_CHARS_GLOBAL
} = require('./constants');

exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);
exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');

Expand Down

0 comments on commit 75097dd

Please sign in to comment.