native.js 288 B

12345678910111213
  1. 'use strict'
  2. let binding = require('bindings')('secp256k1')
  3. delete binding.path
  4. // NaN drops function names, add them for is* (via toJSON)
  5. for (let key in binding) {
  6. if (key.indexOf('is') !== 0) continue
  7. binding[key].toJSON = function () { return key }
  8. }
  9. module.exports = binding