MCPcopy Index your code
hub / github.com/codecombat/codecombat / publish

Method publish

app/models/CocoModel.js:365–368  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

363 }
364
365 publish () {
366 if (this.isPublished()) { throw new Error('Can\'t publish what\'s already-published. Can\'t kill what\'s already dead.') }
367 return this.set('permissions', this.get('permissions', true).concat({ access: 'read', target: 'public' }))
368 }
369
370 static isObjectID (s) {
371 return (s.length === 24) && (__guard__(s.match(/[a-f0-9]/gi), x => x.length) === 24)

Callers 15

watchForErrorsFunction · 0.80
onAwayFunction · 0.80
onAwayBackFunction · 0.80
onHiddenFunction · 0.80
onVisibleFunction · 0.80
errors.jsFile · 0.80
onIdleChangedFunction · 0.80
initFunction · 0.80
navigateMethod · 0.80
toggleSoundFunction · 0.80
tokenFunction · 0.80

Calls 3

isPublishedMethod · 0.95
setMethod · 0.95
getMethod · 0.95

Tested by

no test coverage detected