UNPKG

@redocly/graphql-docs

Version:

Redocly GraphQL docs

2 lines (1 loc) 202 B
import{isRegExp as o}from"./is-regexp.js";function i(r){if(o(r))return r;try{const t=r.split("/"),e=t.pop(),n=t.slice(1).join("/");return new RegExp(n,e)}catch{return}}export{i as getRegExpFromString};