Wondering what’s next for npm?Check out our public roadmap! »

    @twostairs/paperknife

    1.0.3 • Public • Published

    paperknife.js

    paperknife.js is a RFC 2822 compliant e-mail address parser/validator developed with PEG.js as a pure JavaScript library that can be used on the in browsers as well as on the Node.js server-side.

    Installation

    Browser

    <script src="paperknife.min.js" type="text/javascript" charset="utf-8" async></script>

    Node.js

    npm install --save @twostairs/paperknife

    Usage

    const Paperknife = require('paperknife/paperknife');
    var splittedData = Paperknife.parse('Marius <marius@twostairs.com>');
    console.log(JSON.stringify(splittedData));

    Output:

    "[[{"type":"displayname","value":"Marius"},{"type":"localpart","value":"marius"},{"type":"domain","value":"twostairs.com"},{}]]"

    Install

    npm i @twostairs/paperknife

    DownloadsWeekly Downloads

    2

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    81.2 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar