UNPKG

publication-ids

Version:

Javascript / Typescript validator and parse for publication ids; DOI, PMID, PMCID, ISBN, and ISSN

21 lines (20 loc) 823 B
export interface ISBNParse { source: string | string[]; isValid: boolean; isbn10?: string; isbn13?: string; } /** * Parses a given source string to extract and validate ISBNs. * * @param {string | string[]} source - The source string or array of strings containing potential ISBNs. * @returns {ISBNParse[]} An array of objects representing the parsed IDs, including their validity * * @typedef {Object} ISBNParse * @property {string | string[]} source - The original source string. * @property {string | undefined} isbn10 - The parsed ISBN-10, if valid. * @property {string | undefined} isbn13 - The parsed ISBN-13, if valid. * @property {boolean} isValid - Indicates whether the parsed ID is valid. */ declare const _default: (source: string | string[]) => ISBNParse[]; export default _default;