nl_tokens: ViewModel constructor
pl_tokens: function ViewModel ( attr , repository , version ) { if ( ! repository ) { var errMsg = 'Please pass in a valid repository' ; console . log ( errMsg ) ; throw new Error ( errMsg ) ; } for ( var f in Repository . prototype ) { if ( ! _ . isFunction ( repository [ f ] ) ) { var errMsg = 'Please pass in a valid repository' ; console . log ( errMsg ) ; throw new Error ( errMsg ) ; } } if ( attr . id ) { this . id = _ . clone ( attr . id ) ; } // version addition, used by elasticsearch6, null means a new model if ( version !== undefined ) this . version = _ . clone ( <mask> ) ; this . actionOnCommit = 'create' ; this . repository = repository ; this . attributes = _ . cloneDeep ( attr ) ; }