mirror of
https://github.com/nodejs/node.git
synced 2025-08-20 09:25:30 +02:00

PR-URL: https://github.com/nodejs/node/pull/52351 Reviewed-By: Luke Karrys <luke@lukekarrys.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
14 lines
No EOL
492 B
JavaScript
14 lines
No EOL
492 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.assertValidPattern = void 0;
|
|
const MAX_PATTERN_LENGTH = 1024 * 64;
|
|
const assertValidPattern = (pattern) => {
|
|
if (typeof pattern !== 'string') {
|
|
throw new TypeError('invalid pattern');
|
|
}
|
|
if (pattern.length > MAX_PATTERN_LENGTH) {
|
|
throw new TypeError('pattern is too long');
|
|
}
|
|
};
|
|
exports.assertValidPattern = assertValidPattern;
|
|
//# sourceMappingURL=assert-valid-pattern.js.map
|