UNPKG

@trivechain/x16rv2-hash-js

Version:

X16Rv2 Hash Algorithm implemented for Node JS

9 lines (8 loc) 358 B
// Don't export bindings unless there is fs access. // Intended to disable x16rv2 import in browser where extensions are unavailable. if (require('fs').accessSync) { // console.log('Exporting x16r bindings.'); module.exports = require('bindings')('x16rv2hash.node'); } else { // console.log('Could not export x16rv2 bindings (no fs access).'); }