lacona-phrase-email
v0.4.0
Published
lacona phrase for matching an email address
Downloads
25
Maintainers
Readme
lacona-phrase-email
Lacona Phrases for matching an email-related information
Installation
npm install lacona-phrase-email
Usage
/** @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 [email protected]')
/* [{
words: [
{text: 'email ', input: true},
{text: '[email protected]', input: true, argument='email'}
}] */
Reference
EmailAddress
Matches standard [email protected] email addresses.
Result
String
- the email address
Props
argument
: String - the text for the label