UNPKG

@cloudbase/js-sdk

Version:
30 lines (29 loc) 783 B
import { SYMBOL_REGEXP } from '../helper/symbol'; var RegExp = (function () { function RegExp(_a) { var regexp = _a.regexp, options = _a.options; if (!regexp) { throw new TypeError('regexp must be a string'); } this.$regex = regexp; this.$options = options; } RegExp.prototype.parse = function () { return { $regex: this.$regex, $options: this.$options }; }; Object.defineProperty(RegExp.prototype, "_internalType", { get: function () { return SYMBOL_REGEXP; }, enumerable: false, configurable: true }); return RegExp; }()); export { RegExp }; export function RegExpConstructor(param) { return new RegExp(param); }