@cjser/somebody
v3.0.0-cjser.2
Published
Parse/stringify contact info like `Sindre Sorhus <[email protected]> (sindresorhus.com)`
Maintainers
Readme
somebody
Parse/stringify contact info like
Sindre Sorhus <[email protected]> (sindresorhus.com)
Install
$ npm install somebodyUsage
import {parse, stringify} from 'somebody';
const author = 'Sindre Sorhus <[email protected]> (sindresorhus.com)';
const parsed = parse(author);
//=> {name: 'Sindre Sorhus', email: '[email protected]', url: 'https://sindresorhus.com'}
stringify(parsed) === author;
//=> trueEmail and URL are optional.
cjser
This package is a CommonJS-compatible build generated by cjser for projects that still need require() support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.
Original repository: https://github.com/sindresorhus/somebody
