util.js 331 B

123456789101112
  1. 'use strict';
  2. exports.getBooleanOption = (options, key) => {
  3. let value = false;
  4. if (key in options && typeof (value = options[key]) !== 'boolean') {
  5. throw new TypeError(`Expected the "${key}" option to be a boolean`);
  6. }
  7. return value;
  8. };
  9. exports.cppdb = Symbol();
  10. exports.inspect = Symbol.for('nodejs.util.inspect.custom');