massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / table / node_modules / ajv / lib / compile / codegen / code.ts
index 4739ff006e5febc6c589fae59c134821cda6e145..bd9b38502b939b1adcf95650c70b90162a6ccb92 100644 (file)
@@ -154,3 +154,7 @@ export function safeStringify(x: unknown): string {
 export function getProperty(key: Code | string | number): Code {
   return typeof key == "string" && IDENTIFIER.test(key) ? new _Code(`.${key}`) : _`[${key}]`
 }
+
+export function regexpCode(rx: RegExp): Code {
+  return new _Code(rx.toString())
+}