UNPKG

@scalar/api-reference

Version:

Generate beautiful API references from OpenAPI documents

14 lines (13 loc) 263 B
import { REGEX as e } from "@scalar/helpers/regex/regex-helpers"; const u = (r) => { if (!("$ref" in r)) return null; const t = r.$ref; if (!t) return null; const n = t.match(e.REF_NAME); return n ? n[1] : null; }; export { u as getRefName };