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

Method isDefined

src/sequelize.js:496–498  ·  view source on GitHub ↗

* 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

494 * @returns {boolean} Returns true if model is already defined, otherwise false
495 */
496 isDefined(modelName) {
497 return !!this.modelManager.models.find(model => model.name === modelName);
498 }
499
500 /**
501 * Execute a query on the DB, optionally bypassing all the Sequelize goodness.

Callers 4

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

Calls

no outgoing calls

Tested by

no test coverage detected