nl_tokens: Function : findRegisteredIdentifier Scans the registered models and collections for the given model . When found the identifier of the registration gets returned . Otherwise undefined is returned .
pl_tokens: function findRegisteredIdentifier ( modelOrCollection ) { var foundKey ; for ( var key <mask> this . registeredModelsAndCollections ) { var registeredModelOrCollection = this . registeredModelsAndCollections [ key ] ; if ( modelOrCollection . constructor === registeredModelOrCollection ) { foundKey = key ; break ; } else { if ( _ . has ( registeredModelOrCollection , 'collectionClass' ) && modelOrCollection . constructor === registeredModelOrCollection . collectionClass ) { foundKey = key ; break ; } } } return foundKey ; }