mirror of
https://github.com/nodejs/node.git
synced 2025-08-18 15:18:46 +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>
10 lines
No EOL
336 B
JavaScript
10 lines
No EOL
336 B
JavaScript
const MAX_PATTERN_LENGTH = 1024 * 64;
|
|
export 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');
|
|
}
|
|
};
|
|
//# sourceMappingURL=assert-valid-pattern.js.map
|