MCPcopy Create free account
hub / github.com/BridgeAR/safe-stable-stringify / getBigIntOption

Function getBigIntOption

index.js:152–165  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

150}
151
152function 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
167function getBooleanOption (options, key, defaultValue) {
168 let value

Callers 1

configureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected