MCPcopy Create free account
hub / github.com/di-sukharev/opencommit / datetimeRegex

Function datetimeRegex

out/cli.cjs:29850–29858  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

29848 return new RegExp(`^${timeRegexSource(args)}$`);
29849 }
29850 function datetimeRegex(args) {
29851 let regex = `${dateRegexSource}T${timeRegexSource(args)}`;
29852 const opts = [];
29853 opts.push(args.local ? `Z?` : `Z`);
29854 if (args.offset)
29855 opts.push(`([+-]\\d{2}:?\\d{2})`);
29856 regex = `${regex}(${opts.join("|")})`;
29857 return new RegExp(`^${regex}$`);
29858 }
29859 exports2.datetimeRegex = datetimeRegex;
29860 function isValidIP(ip, version) {
29861 if ((version === "v4" || !version) && ipv4Regex.test(ip)) {

Callers 1

_parseMethod · 0.85

Calls 2

timeRegexSourceFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected