import { truncate } from "./helpers.js";

//#region ../../node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/regexp.js
function inspectRegExp(value, options) {
	const flags = value.toString().split("/")[2];
	const sourceLength = options.truncate - (2 + flags.length);
	const source = value.source;
	return options.stylize(`/${truncate(source, sourceLength)}/${flags}`, "regexp");
}

//#endregion
export { inspectRegExp as default };