First release.
Parse an npm-style author string — "Name <email> (url)" — into its name, email, and url. A faithful Rust port of the parse-author npm package (and the author-regex it is built on).
use parse_author::parse_author;
let a = parse_author("Jon Schlinkert <jon@example.com> (https://github.com/jonschlinkert)");
assert_eq!(a.name.as_deref(), Some("Jon Schlinkert"));
assert_eq!(a.email.as_deref(), Some("jon@example.com"));
assert_eq!(a.url.as_deref(), Some("https://github.com/jonschlinkert"));parse_author(input) -> Author { name, email, url }(eachOption<String>)- The opening bracket decides the field (
<…>email,(…)url); unmatched shapes yield an emptyAuthor - Zero dependencies;
#![no_std]
Differential-tested against the real node parse-author: 0 mismatches over 11039 author strings (including the subtle multi-delimiter whitespace rule, cross-brackets, and NEL/BOM edge cases), plus a panic fuzz.
Fills a real gap — useful for package.json tooling (license/SBOM checkers, registry tools).