Lacona Phrases for matching an email-related information
npm install lacona-phrase-email
/** @jsx createElement */
import { createElement, Phrase } from 'lacona-phrase'
import { EmailAddress } from 'lacona-phrase-email'
import { Parser } from 'lacona'
const parser = new Parser({
grammar: (
<sequence>
<literal text='email ' />
<EmailAddress />
</sequence>
)
})
parser.parseArray('email app@lacona.io')
/* [{
words: [
{text: 'email ', input: true},
{text: 'app@lacona.io', input: true, argument='email'}
}] */
Matches standard user@domain.tld email addresses.
String
- the email address
argument
: String - the text for the label