All Projects → jonschlinkert → parse-author

jonschlinkert / parse-author

Licence: MIT license
Parse a person, author, contributor or maintainer string into an object with name, email and url properties following NPM conventions. Useful for the `authors` property in package.json or for parsing an AUTHORS file into an array of person objects.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to parse-author

Attributedstring
基于Swift插值方式优雅的构建富文本, 支持点击长按事件, 支持不同类型过滤, 支持自定义视图等.
Stars: ✭ 294 (+1178.26%)
Mutual labels:  string, regex
String.prototype.matchAll
Spec-compliant polyfill for String.prototype.matchAll, in ES2020
Stars: ✭ 14 (-39.13%)
Mutual labels:  string, regex
Kind Of
Get the native JavaScript type of a value, fast. Used by superstruct, micromatch and many others!
Stars: ✭ 268 (+1065.22%)
Mutual labels:  string, regex
Bee.js
javaScript常用工具类
Stars: ✭ 130 (+465.22%)
Mutual labels:  string, regex
es6-template-regex
Regular expression for matching es6 template delimiters in a string.
Stars: ✭ 15 (-34.78%)
Mutual labels:  parse, regex
common-words
Updated list of the 100 most common words in the English language. Useful for excluding these words from arrays.
Stars: ✭ 13 (-43.48%)
Mutual labels:  parse, string
node-red-contrib-string
Provides a string manipulation node with a chainable UI based on the concise and lightweight stringjs.com.
Stars: ✭ 15 (-34.78%)
Mutual labels:  parse, string
parse-github-url
Parse a Github URL into an object. Supports a wide variety of GitHub URL formats.
Stars: ✭ 114 (+395.65%)
Mutual labels:  parse, regex
Harbol
Harbol is a collection of data structure and miscellaneous libraries, similar in nature to C++'s Boost, STL, and GNOME's GLib
Stars: ✭ 18 (-21.74%)
Mutual labels:  string
url-regex-safe
Regular expression matching for URL's. Maintained, safe, and browser-friendly version of url-regex. Resolves CVE-2020-7661 for Node.js servers.
Stars: ✭ 59 (+156.52%)
Mutual labels:  regex
regexm
A Rust macro for writing regex pattern matching.
Stars: ✭ 46 (+100%)
Mutual labels:  regex
RegexReplacer
A flexible tool to make complex replacements with regular expression
Stars: ✭ 38 (+65.22%)
Mutual labels:  regex
cregex
A small implementation of regular expression matching engine in C
Stars: ✭ 72 (+213.04%)
Mutual labels:  regex
logparser
Easy parsing of Apache HTTPD and NGINX access logs with Java, Hadoop, Hive, Pig, Flink, Beam, Storm, Drill, ...
Stars: ✭ 139 (+504.35%)
Mutual labels:  parse
sitemapper
parses sitemaps for Node.JS
Stars: ✭ 70 (+204.35%)
Mutual labels:  parse
gulp-reporter
Error report for: CSSLint/EditorConfig/ESLint/HTMLHint/JSCS/JSHint/PostCSS/Standard/TSLint/XO
Stars: ✭ 17 (-26.09%)
Mutual labels:  author
problem-solving
No description or website provided.
Stars: ✭ 56 (+143.48%)
Mutual labels:  string
tree-sitter-regex
Tree-sitter parser for regular expressions
Stars: ✭ 42 (+82.61%)
Mutual labels:  regex
exjson
JSON parser and genarator in Elixir.
Stars: ✭ 71 (+208.7%)
Mutual labels:  parse
php-helpers
An extensive set of PHP helper functions and classes.
Stars: ✭ 27 (+17.39%)
Mutual labels:  string

parse-author NPM version NPM monthly downloads NPM total downloads Linux Build Status

Parse a string into an object with name, email and url properties following npm conventions. Useful for the authors property in package.json or for parsing an AUTHORS file into an array of authors objects.

Install

Install with npm:

$ npm install --save parse-author

Usage

var parse = require('parse-author');

Supported formats

Works with a flexible range of formats, any of the properties can be used or missing:

Name
Name <email> (url)
Name <email>(url)
Name<email> (url)
Name<email>(url)
Name (url) <email>
Name (url)<email>
Name(url) <email>
Name(url)<email>
Name (url)
Name(url)
Name <email>
Name<email>
<email> (url)
<email>(url)
(url) <email>
(url)<email>
<email>
(url)

Examples

var author = parse('Jon Schlinkert <[email protected]> (https://github.com/jonschlinkert)');
console.log(author);
//=> {name: 'Jon Schlinkert', email: '[email protected]', url: 'https://github.com/jonschlinkert'}

console.log(parse('Jon Schlinkert (https://github.com/jonschlinkert)'));
//=> {name: 'Jon Schlinkert', url: 'https://github.com/jonschlinkert'}

console.log(parse('Jon Schlinkert <[email protected]>'));
//=> {name: 'Jon Schlinkert', email: '[email protected]'}

console.log(parse(''));
//=> {}

About

Related projects

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Contributors

Commits Contributor
14 slang800
12 jonschlinkert
1 MitMaro

Building docs

(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)

To generate the readme, run the following command:

$ npm install -g verbose/verb#dev verb-generate-readme && verb

Running tests

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:

$ npm install && npm test

Author

Jon Schlinkert

License

Copyright © 2017, Jon Schlinkert. Released under the MIT License.


This file was generated by verb-generate-readme, v0.4.3, on March 08, 2017.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].