Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
var pluralize = require('pluralize');
var colors;
try {
var hex = require('text-hex');
var crayon = require('@ccheever/crayon');
colors = {
hex: hex.bind(hex),
crayon: crayon.bind(crayon)
};
} catch (_) {
colors = false;
}
var GET_VARIABLE_NAMES_REGEX = /\$\{([A-Za-z_0-9]+)\}/g;
function createGetVariablesRegex(variables) {
return new RegExp('(' + variables.map(function (v) {
return '\\$\\{' + v + '\\}';
}).join('|') + ')', 'g');
}
function createGetWordsRegex(words) {
return new RegExp('(' + words.join('|') + ')', 'g');