author-regex
Regular expression for parsing an `author` string into an object following npm conventions.
Last updated 8 years ago by jonschlinkert .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install author-regex 
SYNC missed versions from official npm registry.

author-regex NPM version

Regular expression for parsing an author string into an object following npm conventions.

This the regex used by parse-authors.

Related

Install

Install with npm

npm i author-regex --save

Install with bower

bower install author-regex --save

Tests

Run

npm test

Usage

var re = require('author-regex');

function authors(str) {
  return re().exec(str);
}
console.log(author('Jon Schlinkert <foo@bar.com> (https://github.com/jonschlinkert)'));

Returns:

[ 'Jon Schlinkert <foo@bar.com> (https://github.com/jonschlinkert)',
  'Jon Schlinkert',
  'foo@bar.com',
  'https://github.com/jonschlinkert',
  index: 0,
  input: 'Jon Schlinkert <foo@bar.com> (https://github.com/jonschlinkert)' ]

Author

Jon Schlinkert

License

Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license


This file was generated by verb-cli on September 29, 2014.

Current Tags

  • 1.0.0                                ...           latest (8 years ago)

3 Versions

  • 1.0.0                                ...           8 years ago
  • 0.2.1                                ...           10 years ago
  • 0.2.0                                ...           10 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE