publication-ids
Version:
Javascript / Typescript validator and parse for publication ids; DOI, PMID, PMCID, ISBN, and ISSN
16 lines (15 loc) • 840 B
TypeScript
import { type DoiParse } from '../doi/parse';
import { type ISBNParse } from '../isbn/parse';
import { type ISSNParse } from '../issn/parse';
import { type PMIDParse } from '../pmid/parse';
/**
* Parses an input string or array of strings and returns an array of parsed identifiers.
* The identifiers can be DOI, ISBN, ISSN, or PMID.
*
* @param {string | string[]} input - The input string or array of strings to be parsed.
* @returns {Array<DoiParse | ISBNParse | ISSNParse | PMIDParse>} An array of parsed identifiers.
* Each identifier is parsed into its respective type (DOI, ISBN, ISSN, or PMID).
* If the identifier is not valid, an object with the source and isValid set to false is returned.
*/
declare const _default: (input: string | string[]) => (DoiParse | ISBNParse | ISSNParse | PMIDParse)[];
export default _default;