From ddbf96a606621527d36f043f00d40d077e5fffdc Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 17 Aug 2016 10:14:38 -0700 Subject: [PATCH] improve first name parser by adding honorific exclusions (#2732) --- src/flux/models/contact.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flux/models/contact.coffee b/src/flux/models/contact.coffee index 45cc088de..67a211344 100644 --- a/src/flux/models/contact.coffee +++ b/src/flux/models/contact.coffee @@ -146,9 +146,9 @@ class Contact extends Model return @_nameParts().join(' ') firstName: -> - articles = ['a', 'the'] + exclusions = ['a', 'the', 'dr.', 'mrs.', 'mr.', 'mx.', 'prof.', 'ph.d.'] for part in @_nameParts() - if part.toLowerCase() not in articles + if part.toLowerCase() not in exclusions return part return ""