publication-ids
Version:
Javascript / Typescript validator and parse for publication ids; DOI, PMID, PMCID, ISBN, and ISSN
19 lines (18 loc) • 721 B
TypeScript
export interface ISSNParse {
source: string | string[];
isValid: boolean;
issn?: string;
}
/**
* Parses a given source string to extract and validate ISSNs.
*
* @param {string | string[]} source - The source string or array of strings containing potentialISSNs.
* @returns {ISSNParse[]} An array of objects representing the parsed IDs, including their validity
*
* @typedef {Object} ISSNParse
* @property {string | string[]} source - The original source string.
* @property {string | undefined} issn - The parsed ISSN, if valid.
* @property {boolean} isValid - Indicates whether the parsed ID is valid.
*/
declare const _default: (source: string | string[]) => ISSNParse[];
export default _default;