MCPcopy
hub / github.com/sequelize/sequelize / isDefined

Method isDefined

lib/sequelize.js:485–487  ·  lib/sequelize.js::Sequelize.isDefined

* Checks whether a model with the given name is defined * * @param {string} modelName The name of a model defined with Sequelize.define * * @returns {boolean} Returns true if model is already defined, otherwise false

(modelName)

Source from the content-addressed store, hash-verified

483 * @returns {boolean} Returns true if model is already defined, otherwise false
484 */
485 isDefined(modelName) {
486 return !!this.modelManager.models.find(model => model.name === modelName);
487 }
488
489 /**
490 * Execute a query on the DB, optionally bypassing all the Sequelize goodness.

Callers 4

modelMethod · 0.95
initMethod · 0.80
constructorMethod · 0.80
sequelize.test.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected