lib/replicator.js
function findOrDeclare(name, namespace, opts) {
	const existingReplicant = find(name, namespace);
	if (typeof existingReplicant !== 'undefined') {
		return existingReplicant;
	}

	return declare(name, namespace, opts);
}
function findOrDeclare(name, namespace, opts) {
	const existingReplicant = find(name, namespace);
	if (typeof existingReplicant !== 'undefined') {
		return existingReplicant;
	}

	return declare(name, namespace, opts);
}
function findOrDeclare ( name , namespace , opts ) { const existingReplicant = find ( name , namespace ) ; if ( typeof existingReplicant !== 'undefined' ) { return existingReplicant ; } return declare ( name , namespace , opts ) ; }
Finds or declares a Replicant. If a Replicant with the given `name` is already present in `namespace`,
returns that existing Replicant. Else, declares a new Replicant.
@param name {string} - The name of the Replicant.
@param namespace {string} - The namespace that the Replicant belongs to.
@param {object} [opts] - The options for this replicant.
@param {*} [opts.defaultValue] - The default value to instantiate this Replicant with. The default value is only
applied if this Replicant has not previously been declared and if it has no persisted value.
@param {boolean} [opts.persistent=true] - Whether to persist the Replicant's value to disk on every change.
Persisted values are re-loaded on startup.
@param {string} [opts.schemaPath] - The filepath at which to look for a JSON Schema for this Replicant.
Defaults to `nodecg/bundles/${bundleName}/schemas/${replicantName}.json`.
Finds or declares a Replicant . If a Replicant with the given name is already present in namespace returns that existing Replicant . Else declares a new Replicant .