Coder Social home page Coder Social logo

mrusme / paperknife.js Goto Github PK

View Code? Open in Web Editor NEW
6.0 4.0 1.0 665 KB

paperknife.js is a RFC 2822 compliant e-mail address parser/validator developed with PEG.js.

Home Page: https://xn--gckvb8fzb.com

License: MIT License

JavaScript 19.20% PEG.js 80.80%
rfc-2822 mail e-mail email parser validator peg pegjs nodejs node

paperknife.js's Introduction

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 <[email protected]>');
console.log(JSON.stringify(splittedData));

Output:

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

paperknife.js's People

Contributors

dependabot[bot] avatar mrusme avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

seanpm2001

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.