const getVocationIcon = ({ vocation }) => { const iconUrl = findKey(VOCATIONS_ICONS, voc => vocation.indexOf(voc) > -1); return `[IMG]${iconUrl}[/IMG]`; }
findKey(this.customComponents, (value) => includes(value, this.props.match.params.slug))
router.get('/partner/student/code', function(req, res) { const partnerSignupCode = req.query.partnerSignupCode if (!partnerSignupCode) { return res.status(422).json({ err: 'Missing partnerSignupCode query string' }) } const allStudentPartnerManifests = config.studentPartnerManifests if (!allStudentPartnerManifests) { return res.status(422).json({ err: 'Missing studentPartnerManifests in config' }) } const studentPartnerKey = findKey(allStudentPartnerManifests, { signupCode: partnerSignupCode.toUpperCase() }) if (!studentPartnerKey) { return res.status(404).json({ err: `No partner key found for partnerSignupCode "${partnerSignupCode}"` }) } return res.json({ studentPartnerKey }) })
const existingInstance = findKey(instances, cfg => cfg.cwd === instance.dir);
const displayedAttribute = current.plugin ? get(responses.plugins, [current.plugin, 'models', current.model || current.collection, 'info', 'mainField']) || findKey(get(responses.plugins, [current.plugin, 'models', current.model || current.collection, 'attributes']), { type : 'string'}) || 'id' : get(responses.models, [current.model || current.collection, 'info', 'mainField']) || findKey(get(responses.models, [current.model || current.collection, 'attributes']), { type : 'string'}) || 'id';
const findSoundKeyById = soundId => findKey(sound => sound.id === soundId)