Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
facts.get({ object: color, predicate:'color'}, function(err, list) {
if (!_.isEmpty(list) || toHex.get(color) !== undefined) {
var colorHex = toHex(color);
that.message.props['color'] = colorHex;
userPlugin.save.call(that, "currentColor", colorHex, function(){
cb(null, color + " is a great. This shade?");
});
} else {
cb(null, "That isn't a color");
}
});
};