| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 25e6f48 commit 14ec52b
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -903,17 +903,15 @@ const validatePrimitiveStringAfterArrayBufferView = hideStackFrames((buffer, nam | |||
| 903 | 903 | ||
| 904 | 904 | const validatePosition = hideStackFrames((position, name) => { | |
| 905 | 905 | if (typeof position === 'number') { | |
| 906 | - validateInteger(position, 'position'); | ||
| 906 | + validateInteger(position, name); | ||
| 907 | 907 | } else if (typeof position === 'bigint') { | |
| 908 | 908 | if (!(position >= -(2n ** 63n) && position <= 2n ** 63n - 1n)) { | |
| 909 | - throw new ERR_OUT_OF_RANGE('position', | ||
| 909 | + throw new ERR_OUT_OF_RANGE(name, | ||
| 910 | 910 | `>= ${-(2n ** 63n)} && <= ${2n ** 63n - 1n}`, | |
| 911 | 911 | position); | |
| 912 | 912 | } | |
| 913 | 913 | } else { | |
| 914 | - throw new ERR_INVALID_ARG_TYPE('position', | ||
| 915 | - ['integer', 'bigint'], | ||
| 916 | - position); | ||
| 914 | + throw new ERR_INVALID_ARG_TYPE(name, ['integer', 'bigint'], position); | ||
| 917 | 915 | } | |
| 918 | 916 | }); | |
| 919 | 917 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments