synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
25 lines • 865 B
TypeScript
import { Reference } from '@sage-bionetworks/synapse-types';
export declare const DOI_REGEX: RegExp;
export declare function convertDoiToLink(doi: string): string;
/**
* Checks for a Synapse ID, with or without a version number.
* Captures the synId and version number into capture groups.
*
* Usage examples:
* > const result = 'syn123.9'.match(SYNAPSE_ENTITY_ID_REGEX)
* > result[0]
* 'syn123.9'
* > result[1]
* 'syn123'
* > result[2]
* '9'
*/
export declare const SYNAPSE_ENTITY_ID_REGEX: RegExp;
/**
* Given a Synapse Entity ID of the form `syn123` or `syn123.4`, returns the
* Reference object containing the entity ID and optional version number.
* If the ID is not a valid Synapse Entity ID, returns null.
* @param synId
*/
export declare function parseSynId(synId: string): Reference | null;
//# sourceMappingURL=RegularExpressions.d.ts.map