How to use the trim function from bn.js
Find comprehensive JavaScript bn.js.trim code examples handpicked from public code repositorys.
GitHub: RavenDevKit/ravencore-lib

75 76 77 78 79 80 81 82 83 84
buf = new Buffer(hex, 'hex'); if (natlen === opts.size) { buf = buf; } else if (natlen > opts.size) { buf = BN.trim(buf, natlen); } else if (natlen < opts.size) { buf = BN.pad(buf, natlen, opts.size); } } else {
bn.js.prototype is the most popular function in bn.js (15750 examples)