Use single quotes for identifiers

This commit is contained in:
Daniel Gasienica 2018-04-11 15:44:52 -04:00
parent 819671a23a
commit 24f4ad53bc
15 changed files with 73 additions and 73 deletions

View file

@ -16,14 +16,14 @@ const REDACTION_PLACEHOLDER = '[REDACTED]';
// _redactPath :: Path -> String -> String
exports._redactPath = (filePath) => {
if (!is.string(filePath)) {
throw new TypeError('"filePath" must be a string');
throw new TypeError("'filePath' must be a string");
}
const filePathPattern = exports._pathToRegExp(filePath);
return (text) => {
if (!is.string(text)) {
throw new TypeError('"text" must be a string');
throw new TypeError("'text' must be a string");
}
if (!is.regExp(filePathPattern)) {
@ -58,7 +58,7 @@ exports._pathToRegExp = (filePath) => {
// redactPhoneNumbers :: String -> String
exports.redactPhoneNumbers = (text) => {
if (!is.string(text)) {
throw new TypeError('"text" must be a string');
throw new TypeError("'text' must be a string");
}
return text.replace(PHONE_NUMBER_PATTERN, `+${REDACTION_PLACEHOLDER}$1`);
@ -67,7 +67,7 @@ exports.redactPhoneNumbers = (text) => {
// redactGroupIds :: String -> String
exports.redactGroupIds = (text) => {
if (!is.string(text)) {
throw new TypeError('"text" must be a string');
throw new TypeError("'text' must be a string");
}
return text.replace(