main
|
Last change
on this file was 81bc7da, checked in by Klimentina Efremova <klimentina08642@…>, 3 months ago |
|
Initial commit
|
-
Property mode
set to
100644
|
|
File size:
492 bytes
|
| Rev | Line | |
|---|
| [81bc7da] | 1 | "use strict";
|
|---|
| 2 | Object.defineProperty(exports, "__esModule", { value: true });
|
|---|
| 3 | exports.assertValidPattern = void 0;
|
|---|
| 4 | const MAX_PATTERN_LENGTH = 1024 * 64;
|
|---|
| 5 | const assertValidPattern = (pattern) => {
|
|---|
| 6 | if (typeof pattern !== 'string') {
|
|---|
| 7 | throw new TypeError('invalid pattern');
|
|---|
| 8 | }
|
|---|
| 9 | if (pattern.length > MAX_PATTERN_LENGTH) {
|
|---|
| 10 | throw new TypeError('pattern is too long');
|
|---|
| 11 | }
|
|---|
| 12 | };
|
|---|
| 13 | exports.assertValidPattern = assertValidPattern;
|
|---|
| 14 | //# sourceMappingURL=assert-valid-pattern.js.map |
|---|
Note:
See
TracBrowser
for help on using the repository browser.