exports.setPrefix = function (t) { var oldPrefix = nohm.prefix; t.expect(1); nohm.setPrefix('hurgel'); t.same(nohm.prefix, helper.getPrefix('hurgel'), 'Setting a custom prefix did not work as expected'); nohm.prefix = oldPrefix; t.done(); };
h = require(__dirname + '/helpers'); /** * The Nohm object used for some general configuration and model creation. * @namespace Nohm * @exports exports as Nohm */ function Nohm () { } /** * The redis prefixed key object. * Defaults to prefixing with 'nohm' which then creates keys like 'nohm:idsets:someModel'. * @static */ Nohm.prefix = h.getPrefix('nohm'); /** * The property types that get indexed in a sorted set. * This should not be changed since it can invalidate already existing data. * @static */ Nohm.indexNumberTypes = ['integer', 'float', 'timestamp']; /** * The current global nohm redis client * @static */ Nohm.client = null; /**
Nohm.setPrefix = function (prefix) { Nohm.prefix = h.getPrefix(prefix); };
h = require(__dirname + '/helpers'); /** * The Nohm object used for some general configuration and model creation. * @namespace Nohm * @exports exports as Nohm */ function Nohm () { } /** * The redis prefixed key object. * Defaults to prefixing with 'nohm' which then creates keys like 'nohm:idsets:someModel'. * @static */ Nohm.prefix = h.getPrefix('nohm'); // TODO: create setPrefix /** * The property types that get indexed in a sorted set. * This should not be changed since it can invalidate already existing data. * @static */ Nohm.indexNumberTypes = ['integer', 'float', 'timestamp']; /** * The current global nohm redis client * @static */ Nohm.client = null; /**