main
|
Last change
on this file since 2d1ec46 was 81bc7da, checked in by Klimentina Efremova <klimentina08642@…>, 3 months ago |
|
Initial commit
|
-
Property mode
set to
100644
|
|
File size:
336 bytes
|
| Line | |
|---|
| 1 | const MAX_PATTERN_LENGTH = 1024 * 64;
|
|---|
| 2 | export const assertValidPattern = (pattern) => {
|
|---|
| 3 | if (typeof pattern !== 'string') {
|
|---|
| 4 | throw new TypeError('invalid pattern');
|
|---|
| 5 | }
|
|---|
| 6 | if (pattern.length > MAX_PATTERN_LENGTH) {
|
|---|
| 7 | throw new TypeError('pattern is too long');
|
|---|
| 8 | }
|
|---|
| 9 | };
|
|---|
| 10 | //# sourceMappingURL=assert-valid-pattern.js.map |
|---|
Note:
See
TracBrowser
for help on using the repository browser.