{
  "version": 3,
  "sources": ["../../src/lib/function.ts"],
  "sourcesContent": ["/**\n * When a function is wrapped in `omitFromStackTrace`, if it throws an error the stack trace won't\n * include the function itself or any stack frames above it. Useful for assertion-style function\n * where the error will ideally originate from the call-site rather than within the implementation\n * of the assert fn.\n *\n * Only works in platforms that support `Error.captureStackTrace` (ie v8).\n *\n * @internal\n */\nexport function omitFromStackTrace<Args extends Array<unknown>, Return>(\n\tfn: (...args: Args) => Return\n): (...args: Args) => Return {\n\tconst wrappedFn = (...args: Args) => {\n\t\ttry {\n\t\t\treturn fn(...args)\n\t\t} catch (error) {\n\t\t\tif (error instanceof Error && Error.captureStackTrace) {\n\t\t\t\tError.captureStackTrace(error, wrappedFn)\n\t\t\t}\n\t\t\tthrow error\n\t\t}\n\t}\n\n\treturn wrappedFn\n}\n\n/**\n * Does nothing, but it's really really good at it.\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nexport const noop: () => void = () => {}\n"],
  "mappings": "AAUO,SAAS,mBACf,IAC4B;AAC5B,QAAM,YAAY,IAAI,SAAe;AACpC,QAAI;AACH,aAAO,GAAG,GAAG,IAAI;AAAA,IAClB,SAAS,OAAO;AACf,UAAI,iBAAiB,SAAS,MAAM,mBAAmB;AACtD,cAAM,kBAAkB,OAAO,SAAS;AAAA,MACzC;AACA,YAAM;AAAA,IACP;AAAA,EACD;AAEA,SAAO;AACR;AAOO,MAAM,OAAmB,MAAM;AAAC;",
  "names": []
}
