'use strict'; var safeVarName = require('./safeVarName'); class UniqueVars { constructor() { this.vars = {}; } addVar(name, value) { if (typeof value !== 'string') { // Convert the non-string value into a string for easy comparison value = JSON.stringify(value); } name = safeVarName(name); var entry = this.vars[name]; if (entry) { var vars = entry.vars; // See if there is already a variable with the requested value for (var i=0; i