UNPKG

synapse-react-client

Version:

[![Build Status](https://travis-ci.com/Sage-Bionetworks/Synapse-React-Client.svg?branch=main)](https://travis-ci.com/Sage-Bionetworks/Synapse-React-Client) [![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synaps

21 lines 784 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SYNAPSE_ENTITY_ID_REGEX = exports.DOI_REGEX = void 0; // doi regex here - https://www.crossref.org/blog/dois-and-matching-regular-expressions/ // note - had to add an escape character for the second and third forward slash in the regex above exports.DOI_REGEX = /^10.\d{4,9}\/[-._;()\/:a-z0-9]+$/i; /** * 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' */ exports.SYNAPSE_ENTITY_ID_REGEX = /^(syn\d+)(?:\.(\d+))?$/; //# sourceMappingURL=RegularExpressions.js.map