| 150 | } |
| 151 | |
| 152 | function getBigIntOption (options) { |
| 153 | let value |
| 154 | if (hasOwnProperty.call(options, 'bigint')) { |
| 155 | value = options.bigint |
| 156 | if (typeof value === 'string') { |
| 157 | if (value !== 'string') { |
| 158 | throw new TypeError('The "bigint" argument must be of type boolean or the string "string"') |
| 159 | } |
| 160 | } else if (typeof value !== 'boolean') { |
| 161 | throw new TypeError('The "bigint" argument must be of type boolean or the string "string"') |
| 162 | } |
| 163 | } |
| 164 | return value === undefined ? true : value |
| 165 | } |
| 166 | |
| 167 | function getBooleanOption (options, key, defaultValue) { |
| 168 | let value |