{"_id":"bigint-buffer","_rev":"4620020","name":"bigint-buffer","description":"bigint to buffer conversion with native support","dist-tags":{"latest":"1.1.5"},"maintainers":[{"name":"no2chem","email":""}],"time":{"modified":"2026-04-10T18:21:18.000Z","created":"2018-09-12T16:55:40.650Z","1.1.5":"2019-10-17T00:52:14.536Z","1.1.2":"2018-09-19T18:29:40.583Z","1.1.1":"2018-09-18T19:31:30.180Z","1.1.0":"2018-09-18T10:26:52.158Z","1.0.1":"2018-09-17T23:49:13.191Z","0.1.5":"2018-09-13T15:09:36.834Z","0.1.4":"2018-09-13T13:34:12.934Z","0.1.3":"2018-09-12T19:40:16.242Z","0.1.2":"2018-09-12T19:16:34.037Z","0.1.1":"2018-09-12T18:50:39.149Z","0.1.0":"2018-09-12T16:55:40.650Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/no2chem/bigint-buffer.git"},"versions":{"1.1.5":{"name":"bigint-buffer","version":"1.1.5","description":"bigint to buffer conversion with native support","main":"dist/node.js","browser":{"./dist/node.js":"./dist/browser.js"},"types":"dist/index.d.ts","scripts":{"test":"npm run test:node && npm run test:browser","coverage":"istanbul cover ./test/index.js","coveralls":"npm run coverage && coveralls <coverage/lcov.info","lint":"gts check","install":"npm run rebuild || echo \"Couldn't build bindings. Non-native version used.\"","prepare":"npm run compile","prepublishOnly":"rm -rf build/Release; rm build/Makefile; rm build/gyp-*; rm build/*.mk; rm build/*.Makefile; rm *.tgz","test:browser":"karma start karma.conf.js","test:node":"mocha -r ts-node/register src/**/*.spec.ts --timeout 40000","benchmark":"node -r ts-node/register src/index.bench.ts","typedoc":"typedoc --out docs $(pwd)/src $(pwd)/helper --target es6 --mode file --tsconfig ./tsconfig.json --excludePrivate --excludeProtected --excludeNotExported --exclude '**/*+(spec|bench).ts'","rebuild":"node-gyp rebuild","check":"gts check","clean":"gts clean","compile":"mkdirp dist && tsc -p . && rollup -c > dist/node.js && cross-env BROWSER=true rollup -c > dist/browser.js && cpx \"build/src/*.d.ts\" dist","fix":"gts fix","pretest":"npm run compile","posttest":"npm run check"},"repository":{"type":"git","url":"git+https://github.com/no2chem/bigint-buffer.git"},"bugs":{"url":"https://github.com/no2chem/bigint-buffer/issues"},"keywords":["bigint","bignum","tc39-bigint","napi"],"license":"Apache-2.0","dependencies":{"bindings":"^1.3.0"},"devDependencies":{"@types/benchmark":"^1.0.31","@types/bn.js":"^4.11.2","@types/chai":"^4.1.4","@types/mocha":"^5.2.5","@types/node":"^10.7.1","benchmark":"^2.1.4","bn.js":"^4.11.8","chai":"^4.1.2","coveralls":"^3.0.2","cpx":"^1.5.0","cross-env":"^6.0.3","gts":"^0.8.0","istanbul":"^0.4.1","karma":"^3.0.0","karma-chrome-launcher":"^2.2.0","karma-env-preprocessor":"^0.1.1","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-webpack":"^3.0.0","microtime":"^3.0.0","mkdirp":"^0.5.1","mocha":"^5.2.0","pre-commit":"^1.2.2","rollup":"^0.65.2","rollup-plugin-replace":"^2.0.0","ts-loader":"^4.5.0","ts-node":"^7.0.1","typedoc":"^0.12.0","typescript":"^3.2.1","webpack":"^4.16.5","webpack-cli":"^3.1.0"},"engines":{"node":">= 10.0.0"},"publishConfig":{"access":"public"},"contributors":[{"name":"Michael Wei","email":"mwei@vmware.com","url":"https://github.com/no2chem"}],"gitHead":"665a22d545190152afef55b9ff713d76b70f202f","homepage":"https://github.com/no2chem/bigint-buffer#readme","_id":"bigint-buffer@1.1.5","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"shasum":"d038f31c8e4534c1f8d0015209bf34b4fa6dd442","size":15800,"noattachment":false,"key":"/bigint-buffer/-/bigint-buffer-1.1.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/bigint-buffer/download/bigint-buffer-1.1.5.tgz"},"maintainers":[{"name":"no2chem","email":""}],"_npmUser":{"name":"no2chem","email":"mwei@cs.ucsd.edu"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bigint-buffer_1.1.5_1571273534423_0.24849213401703296"},"_hasShrinkwrap":false,"publish_time":1571273534536,"_cnpm_publish_time":1571273534536,"_cnpmcore_publish_time":"2021-12-16T10:05:59.289Z","hasInstallScript":true},"1.1.2":{"name":"bigint-buffer","version":"1.1.2","description":"bigint to buffer conversion with native support","main":"dist/node.js","browser":{"./dist/node.js":"./dist/browser.js"},"types":"dist/index.d.ts","scripts":{"test":"npm run test:node && npm run test:browser","coverage":"istanbul cover ./test/index.js","coveralls":"npm run coverage && coveralls <coverage/lcov.info","lint":"gts check","install":"npm run rebuild || echo \"Couldn't build bindings. Non-native version used.\"","prepare":"npm run compile","prepublishOnly":"rm -rf build/Release; rm build/Makefile; rm build/gyp-*; rm build/*.mk; rm build/*.Makefile; rm *.tgz","test:browser":"karma start karma.conf.js","test:node":"mocha -r ts-node/register src/**/*.spec.ts --timeout 40000","benchmark":"node -r ts-node/register src/index.bench.ts","typedoc":"typedoc --out docs $(pwd)/src $(pwd)/helper --target es6 --mode file --tsconfig ./tsconfig.json --excludePrivate --excludeProtected --excludeNotExported --exclude '**/*+(spec|bench).ts'","rebuild":"node-gyp rebuild","check":"gts check","clean":"gts clean","compile":"mkdir -p dist; tsc -p .;rollup -c > dist/node.js && BROWSER=true rollup -c > dist/browser.js; cp build/src/*.d.ts dist","fix":"gts fix","pretest":"npm run compile","posttest":"npm run check"},"repository":{"type":"git","url":"git+https://github.com/no2chem/bigint-buffer.git"},"bugs":{"url":"https://github.com/no2chem/bigint-buffer/issues"},"keywords":["bigint","bignum","tc39-bigint","napi"],"license":"Apache-2.0","dependencies":{"bindings":"^1.3.0"},"devDependencies":{"@types/benchmark":"^1.0.31","@types/bn.js":"^4.11.2","@types/chai":"^4.1.4","@types/mocha":"^5.2.5","@types/node":"^10.7.1","benchmark":"^2.1.4","bn.js":"^4.11.8","chai":"^4.1.2","coveralls":"^3.0.2","gts":"^0.8.0","istanbul":"^0.4.1","karma":"^3.0.0","karma-chrome-launcher":"^2.2.0","karma-env-preprocessor":"^0.1.1","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-webpack":"^3.0.0","microtime":"^2.1.8","mocha":"^5.2.0","pre-commit":"^1.2.2","rollup":"^0.65.2","rollup-plugin-replace":"^2.0.0","ts-loader":"^4.5.0","ts-node":"^7.0.1","typedoc":"^0.12.0","typescript":"github:calebsander/TypeScript#feature/bigint-lkg","webpack":"^4.16.5","webpack-cli":"^3.1.0"},"engines":{"node":">= 10.0.0"},"publishConfig":{"access":"public"},"contributors":[{"name":"Michael Wei","email":"mwei@vmware.com","url":"https://github.com/no2chem"}],"gitHead":"644ff8d7fac9251563c630397e6d54919bb49368","homepage":"https://github.com/no2chem/bigint-buffer#readme","_id":"bigint-buffer@1.1.2","_npmVersion":"6.4.1","_nodeVersion":"10.10.0","_npmUser":{"name":"no2chem","email":"mwei@cs.ucsd.edu"},"dist":{"shasum":"b7edfaf3a88d0767aed7edc671d6bae4b1021575","size":15735,"noattachment":false,"key":"/bigint-buffer/-/bigint-buffer-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/bigint-buffer/download/bigint-buffer-1.1.2.tgz"},"maintainers":[{"name":"no2chem","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bigint-buffer_1.1.2_1537381780449_0.12634919152102753"},"_hasShrinkwrap":false,"publish_time":1537381780583,"_cnpm_publish_time":1537381780583,"_cnpmcore_publish_time":"2021-12-16T10:05:59.519Z","hasInstallScript":true},"1.1.1":{"name":"bigint-buffer","version":"1.1.1","description":"bigint to buffer conversion with native support","main":"dist/node.js","browser":{"./dist/node.js":"./dist/browser.js"},"types":"dist/index.d.ts","scripts":{"test":"npm run test:node && npm run test:browser","coverage":"istanbul cover ./test/index.js","coveralls":"npm run coverage && coveralls <coverage/lcov.info","lint":"gts check","install":"npm run rebuild || echo \"Couldn't build bindings. Non-native version used.\"","prepare":"npm run compile","prepublishOnly":"rm -rf build/Release; rm build/Makefile; rm build/gyp-*; rm build/*.mk; rm build/*.Makefile; rm *.tgz","test:browser":"karma start karma.conf.js","test:node":"mocha -r ts-node/register src/**/*.spec.ts --timeout 40000","benchmark":"node -r ts-node/register src/index.bench.ts","typedoc":"typedoc --out docs $(pwd)/src $(pwd)/helper --target es6 --mode file --tsconfig ./tsconfig.json --excludePrivate --excludeProtected --excludeNotExported --exclude '**/*+(spec|bench).ts'","rebuild":"node-gyp rebuild","check":"gts check","clean":"gts clean","compile":"mkdir -p dist; tsc -p .;rollup -c > dist/node.js && BROWSER=true rollup -c > dist/browser.js; cp build/src/*.d.ts dist","fix":"gts fix","pretest":"npm run compile","posttest":"npm run check"},"repository":{"type":"git","url":"git+https://github.com/no2chem/bigint-buffer.git"},"bugs":{"url":"https://github.com/no2chem/bigint-buffer/issues"},"keywords":["bigint","bignum","tc39-bigint","napi"],"license":"Apache-2.0","dependencies":{"bindings":"^1.3.0"},"devDependencies":{"@types/benchmark":"^1.0.31","@types/chai":"^4.1.4","@types/mocha":"^5.2.5","@types/node":"^10.7.1","benchmark":"^2.1.4","chai":"^4.1.2","coveralls":"^3.0.2","gts":"^0.8.0","istanbul":"^0.4.1","karma":"^3.0.0","karma-chrome-launcher":"^2.2.0","karma-env-preprocessor":"^0.1.1","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-webpack":"^3.0.0","microtime":"^2.1.8","mocha":"^5.2.0","pre-commit":"^1.2.2","rollup":"^0.65.2","rollup-plugin-replace":"^2.0.0","ts-loader":"^4.5.0","ts-node":"^7.0.1","typedoc":"^0.12.0","typescript":"github:calebsander/TypeScript#feature/bigint-lkg","webpack":"^4.16.5","webpack-cli":"^3.1.0"},"engines":{"node":">= 10.0.0"},"publishConfig":{"access":"public"},"contributors":[{"name":"Michael Wei","email":"mwei@vmware.com","url":"https://github.com/no2chem"}],"gitHead":"c364b0c86efe8b20a8d5ec6ce41814a55e6b0f12","homepage":"https://github.com/no2chem/bigint-buffer#readme","_id":"bigint-buffer@1.1.1","_npmVersion":"6.4.1","_nodeVersion":"10.10.0","_npmUser":{"name":"no2chem","email":"mwei@cs.ucsd.edu"},"dist":{"shasum":"3f2b699b8b48d7b0b1c52bb932f7c28a8f012fab","size":15193,"noattachment":false,"key":"/bigint-buffer/-/bigint-buffer-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/bigint-buffer/download/bigint-buffer-1.1.1.tgz"},"maintainers":[{"name":"no2chem","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bigint-buffer_1.1.1_1537299089957_0.7384374193330376"},"_hasShrinkwrap":false,"publish_time":1537299090180,"_cnpm_publish_time":1537299090180,"_cnpmcore_publish_time":"2021-12-16T10:05:59.768Z","hasInstallScript":true},"1.1.0":{"name":"bigint-buffer","version":"1.1.0","description":"bigint to buffer conversion with native support","main":"dist/node.js","browser":{"./dist/node.js":"./dist/browser.js"},"types":"dist/index.d.ts","scripts":{"test":"npm run test:node && npm run test:browser","coverage":"istanbul cover ./test/index.js","coveralls":"npm run coverage && coveralls <coverage/lcov.info","lint":"gts check","install":"npm run rebuild || echo \"Couldn't build bindings. Non-native version used.\"","prepare":"npm run compile","prepublishOnly":"rm -rf build/Release; rm build/Makefile; rm build/gyp-*; rm build/*.mk; rm build/*.Makefile; rm *.tgz","test:browser":"karma start karma.conf.js","test:node":"mocha -r ts-node/register src/**/*.spec.ts --timeout 40000","benchmark":"node -r ts-node/register src/index.bench.ts","typedoc":"typedoc --out docs $(pwd)/src $(pwd)/helper --target es6 --mode file --tsconfig ./tsconfig.json --excludePrivate --excludeProtected --excludeNotExported --exclude '**/*+(spec|bench).ts'","rebuild":"node-gyp rebuild","check":"gts check","clean":"gts clean","compile":"mkdir -p dist; tsc -p .;rollup -c > dist/node.js && BROWSER=true rollup -c > dist/browser.js; cp build/src/*.d.ts dist","fix":"gts fix","pretest":"npm run compile","posttest":"npm run check"},"repository":{"type":"git","url":"git+https://github.com/no2chem/bigint-buffer.git"},"bugs":{"url":"https://github.com/no2chem/bigint-buffer/issues"},"keywords":["bigint","bignum","tc39-bigint","napi"],"license":"Apache-2.0","dependencies":{"bindings":"^1.3.0"},"devDependencies":{"@types/benchmark":"^1.0.31","@types/chai":"^4.1.4","@types/mocha":"^5.2.5","@types/node":"^10.7.1","benchmark":"^2.1.4","chai":"^4.1.2","coveralls":"^3.0.2","gts":"^0.5.4","istanbul":"^0.4.1","karma":"^3.0.0","karma-chrome-launcher":"^2.2.0","karma-env-preprocessor":"^0.1.1","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-webpack":"^3.0.0","microtime":"^2.1.8","mocha":"^5.2.0","pre-commit":"^1.2.2","rollup":"^0.65.2","rollup-plugin-replace":"^2.0.0","ts-loader":"^4.5.0","ts-node":"^7.0.1","typedoc":"^0.12.0","typescript":"github:calebsander/TypeScript#feature/bigint-lkg","webpack":"^4.16.5","webpack-cli":"^3.1.0"},"engines":{"node":">= 0.10.0"},"publishConfig":{"access":"public"},"contributors":[{"name":"Michael Wei","email":"mwei@vmware.com","url":"https://github.com/no2chem"}],"gitHead":"14fa58d4b0ed669439c49fb14589f0699520a77e","homepage":"https://github.com/no2chem/bigint-buffer#readme","_id":"bigint-buffer@1.1.0","_npmVersion":"6.4.1","_nodeVersion":"10.10.0","_npmUser":{"name":"no2chem","email":"mwei@cs.ucsd.edu"},"dist":{"shasum":"85e7016704cd11f2e375f602ef7f56f3d54b0e36","size":15165,"noattachment":false,"key":"/bigint-buffer/-/bigint-buffer-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/bigint-buffer/download/bigint-buffer-1.1.0.tgz"},"maintainers":[{"name":"no2chem","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bigint-buffer_1.1.0_1537266412029_0.6034538292154374"},"_hasShrinkwrap":false,"publish_time":1537266412158,"_cnpm_publish_time":1537266412158,"_cnpmcore_publish_time":"2021-12-16T10:06:00.045Z","hasInstallScript":true},"1.0.1":{"name":"bigint-buffer","version":"1.0.1","description":"bigint to buffer conversion with native support","main":"dist/node.js","browser":{"./dist/node.js":"./dist/browser.js"},"types":"dist/index.d.ts","scripts":{"test":"npm run test:node && npm run test:browser","coverage":"istanbul cover ./test/index.js","coveralls":"npm run coverage && coveralls <coverage/lcov.info","lint":"gts check","install":"npm run rebuild || echo \"Couldn't build bindings. Non-native version used.\"","prepare":"npm run compile","prepublishOnly":"rm -rf build/Release; rm build/Makefile; rm build/gyp-*; rm build/*.mk; rm build/*.Makefile; rm *.tgz","test:browser":"karma start karma.conf.js","test:node":"mocha -r ts-node/register src/**/*.spec.ts --timeout 40000","benchmark":"node -r ts-node/register src/index.bench.ts","typedoc":"typedoc --out docs $(pwd)/src $(pwd)/helper --target es6 --mode file --tsconfig ./tsconfig.json --excludePrivate --excludeProtected --excludeNotExported --exclude '**/*+(spec|bench).ts'","rebuild":"node-gyp rebuild","check":"gts check","clean":"gts clean","compile":"mkdir -p dist; tsc -p .;rollup -c > dist/node.js && BROWSER=true rollup -c > dist/browser.js; cp build/src/*.d.ts dist","fix":"gts fix","pretest":"npm run compile","posttest":"npm run check"},"repository":{"type":"git","url":"git+https://github.com/no2chem/bigint-buffer.git"},"bugs":{"url":"https://github.com/no2chem/bigint-buffer/issues"},"keywords":["bigint","bignum","tc39-bigint","napi"],"license":"Apache-2.0","dependencies":{"bindings":"^1.3.0"},"devDependencies":{"@types/benchmark":"^1.0.31","@types/chai":"^4.1.4","@types/mocha":"^5.2.5","@types/node":"^10.7.1","benchmark":"^2.1.4","chai":"^4.1.2","coveralls":"^3.0.2","gts":"^0.5.4","istanbul":"^0.4.1","karma":"^3.0.0","karma-chrome-launcher":"^2.2.0","karma-env-preprocessor":"^0.1.1","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-webpack":"^3.0.0","microtime":"^2.1.8","mocha":"^5.2.0","pre-commit":"^1.2.2","rollup":"^0.65.2","rollup-plugin-replace":"^2.0.0","ts-loader":"^4.5.0","ts-node":"^7.0.1","typedoc":"^0.12.0","typescript":"github:calebsander/TypeScript#feature/bigint-lkg","webpack":"^4.16.5","webpack-cli":"^3.1.0"},"engines":{"node":">= 0.10.0"},"publishConfig":{"access":"public"},"contributors":[{"name":"Michael Wei","email":"mwei@vmware.com","url":"https://github.com/no2chem"}],"gitHead":"753aa3eb1807e47017a3c509e0d7f79853848ac2","homepage":"https://github.com/no2chem/bigint-buffer#readme","_id":"bigint-buffer@1.0.1","_npmVersion":"6.4.1","_nodeVersion":"10.10.0","_npmUser":{"name":"no2chem","email":"mwei@cs.ucsd.edu"},"dist":{"shasum":"064bacbafbd1555f5510ac18bb47e9b39f92fde1","size":121495,"noattachment":false,"key":"/bigint-buffer/-/bigint-buffer-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/bigint-buffer/download/bigint-buffer-1.0.1.tgz"},"maintainers":[{"name":"no2chem","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bigint-buffer_1.0.1_1537228153070_0.17995037799560398"},"_hasShrinkwrap":false,"publish_time":1537228153191,"_cnpm_publish_time":1537228153191,"_cnpmcore_publish_time":"2021-12-16T10:06:00.431Z","hasInstallScript":true},"0.1.5":{"name":"bigint-buffer","version":"0.1.5","description":"bigint to buffer conversion with native support","main":"dist/node.js","browser":{"./dist/node.js":"./dist/browser.js"},"types":"dist/index.d.ts","scripts":{"test":"npm run test:node && npm run test:browser","coverage":"istanbul cover ./test/index.js","coveralls":"npm run coverage && coveralls <coverage/lcov.info","lint":"gts check","install":"npm run rebuild || echo \"Couldn't build bindings. Non-native version used.\"","prepare":"npm run compile","prepublishOnly":"rm -rf build/Release; rm build/Makefile; rm build/gyp-*; rm build/*.mk; rm build/*.Makefile; rm *.tgz","test:browser":"karma start karma.conf.js","test:node":"mocha -r ts-node/register src/**/*.spec.ts --timeout 40000","benchmark":"node -r ts-node/register src/index.bench.ts","typedoc":"typedoc --out docs $(pwd)/src $(pwd)/helper --target es6 --mode file --tsconfig ./tsconfig.json --excludePrivate --excludeProtected --excludeNotExported --exclude '**/*+(spec|bench).ts'","rebuild":"node-gyp rebuild","check":"gts check","clean":"gts clean","compile":"mkdir -p dist; tsc -p .;rollup -c > dist/node.js && BROWSER=true rollup -c > dist/browser.js; cp build/src/*.d.ts dist","fix":"gts fix","pretest":"npm run compile","posttest":"npm run check"},"repository":{"type":"git","url":"git+https://github.com/no2chem/bigint-buffer.git"},"bugs":{"url":"https://github.com/no2chem/bigint-buffer/issues"},"keywords":["bigint","bignum","tc39-bigint","napi"],"license":"Apache-2.0","dependencies":{"bindings":"^1.3.0"},"devDependencies":{"@types/benchmark":"^1.0.31","@types/chai":"^4.1.4","@types/mocha":"^5.2.5","@types/node":"^10.7.1","benchmark":"^2.1.4","chai":"^4.1.2","coveralls":"^3.0.2","gts":"^0.5.4","istanbul":"^0.4.1","karma":"^3.0.0","karma-chrome-launcher":"^2.2.0","karma-env-preprocessor":"^0.1.1","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-webpack":"^3.0.0","microtime":"^2.1.8","mocha":"^5.2.0","pre-commit":"^1.2.2","rollup":"^0.65.2","rollup-plugin-replace":"^2.0.0","ts-loader":"^4.5.0","ts-node":"^7.0.1","typedoc":"^0.12.0","typescript":"github:calebsander/TypeScript#feature/bigint-lkg","webpack":"^4.16.5","webpack-cli":"^3.1.0"},"engines":{"node":">= 0.10.0"},"publishConfig":{"access":"public"},"contributors":[{"name":"Michael Wei","email":"mwei@vmware.com","url":"https://github.com/no2chem"}],"gitHead":"bfe79d1732eee22736fd59b0308b16e85472a6bf","homepage":"https://github.com/no2chem/bigint-buffer#readme","_id":"bigint-buffer@0.1.5","_npmVersion":"6.4.1","_nodeVersion":"10.10.0","_npmUser":{"name":"no2chem","email":"mwei@cs.ucsd.edu"},"dist":{"shasum":"12915825354c410c571c42734b7b99ca9e743570","size":121345,"noattachment":false,"key":"/bigint-buffer/-/bigint-buffer-0.1.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/bigint-buffer/download/bigint-buffer-0.1.5.tgz"},"maintainers":[{"name":"no2chem","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bigint-buffer_0.1.5_1536851376672_0.19853496793669345"},"_hasShrinkwrap":false,"publish_time":1536851376834,"_cnpm_publish_time":1536851376834,"_cnpmcore_publish_time":"2021-12-16T10:06:00.842Z","hasInstallScript":true},"0.1.4":{"name":"bigint-buffer","version":"0.1.4","description":"bigint to buffer conversion with native support","main":"dist/node.js","browser":{"./dist/node.js":"./dist/browser.js"},"types":"dist/index.d.ts","scripts":{"test":"npm run test:node && npm run test:browser","coverage":"istanbul cover ./test/index.js","coveralls":"npm run coverage && coveralls <coverage/lcov.info","lint":"gts check","install":"npm run rebuild || echo \"Couldn't build bindings. Non-native version used.\"","prepare":"npm run compile","prepublishOnly":"rm -rf build/Release; rm build/Makefile; rm build/gyp-*; rm build/*.mk; rm build/*.Makefile; rm *.tgz","test:browser":"karma start karma.conf.js","test:node":"mocha -r ts-node/register src/**/*.spec.ts --timeout 40000","benchmark":"node -r ts-node/register src/index.bench.ts","typedoc":"typedoc --out docs $(pwd)/src $(pwd)/helper --target es6 --mode file --tsconfig ./tsconfig.json --excludePrivate --excludeProtected --excludeNotExported --exclude '**/*+(spec|bench).ts'","rebuild":"node-gyp rebuild","check":"gts check","clean":"gts clean","compile":"mkdir -p dist; tsc -p .;rollup -c > dist/node.js && BROWSER=true rollup -c > dist/browser.js; cp build/src/*.d.ts dist","fix":"gts fix","pretest":"npm run compile","posttest":"npm run check"},"repository":{"type":"git","url":"git+https://github.com/no2chem/bigint-buffer.git"},"bugs":{"url":"https://github.com/no2chem/bigint-buffer/issues"},"keywords":["bigint","bignum","tc39-bigint","napi"],"license":"Apache-2.0","dependencies":{"bindings":"^1.3.0"},"devDependencies":{"@types/benchmark":"^1.0.31","@types/chai":"^4.1.4","@types/mocha":"^5.2.5","@types/node":"^10.7.1","benchmark":"^2.1.4","chai":"^4.1.2","coveralls":"^3.0.2","gts":"^0.5.4","istanbul":"^0.4.1","karma":"^3.0.0","karma-chrome-launcher":"^2.2.0","karma-env-preprocessor":"^0.1.1","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-webpack":"^3.0.0","microtime":"^2.1.8","mocha":"^5.2.0","pre-commit":"^1.2.2","rollup":"^0.65.2","rollup-plugin-replace":"^2.0.0","ts-loader":"^4.5.0","ts-node":"^7.0.1","typedoc":"^0.12.0","typescript":"github:calebsander/TypeScript#feature/bigint-lkg","webpack":"^4.16.5","webpack-cli":"^3.1.0"},"engines":{"node":">= 0.10.0"},"publishConfig":{"access":"public"},"contributors":[{"name":"Michael Wei","email":"mwei@vmware.com","url":"https://github.com/no2chem"}],"gitHead":"a0dd58cc5f585608e5c8d4352f88b782cf060c73","homepage":"https://github.com/no2chem/bigint-buffer#readme","_id":"bigint-buffer@0.1.4","_npmVersion":"6.4.1","_nodeVersion":"10.10.0","_npmUser":{"name":"no2chem","email":"mwei@cs.ucsd.edu"},"dist":{"shasum":"62d048c385c6e06315e18aa68549b68ee12b2ce5","size":121254,"noattachment":false,"key":"/bigint-buffer/-/bigint-buffer-0.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/bigint-buffer/download/bigint-buffer-0.1.4.tgz"},"maintainers":[{"name":"no2chem","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bigint-buffer_0.1.4_1536845652823_0.1519906815544978"},"_hasShrinkwrap":false,"publish_time":1536845652934,"_cnpm_publish_time":1536845652934,"_cnpmcore_publish_time":"2021-12-16T10:06:01.721Z","hasInstallScript":true},"0.1.3":{"name":"bigint-buffer","version":"0.1.3","description":"bigint to buffer conversion with native support","main":"dist/node.js","browser":{"dist/node.js":"dist/browser.js"},"types":"dist/index.d.ts","scripts":{"test":"npm run test:node && npm run test:browser","coverage":"istanbul cover ./test/index.js","coveralls":"npm run coverage && coveralls <coverage/lcov.info","lint":"gts check","install":"npm run rebuild || echo \"Couldn't build bindings. Non-native version used.\"","prepare":"npm run compile","prepublishOnly":"rm -rf build/Release; rm build/Makefile; rm build/gyp-*; rm build/*.mk; rm build/*.Makefile; rm *.tgz","test:browser":"karma start karma.conf.js","test:node":"mocha -r ts-node/register src/**/*.spec.ts --timeout 40000","benchmark":"node -r ts-node/register src/index.bench.ts","typedoc":"typedoc --out docs $(pwd)/src $(pwd)/helper --target es6 --mode file --tsconfig ./tsconfig.json --excludePrivate --excludeProtected --excludeNotExported --exclude '**/*+(spec|bench).ts'","rebuild":"node-gyp rebuild","check":"gts check","clean":"gts clean","compile":"mkdir -p dist; tsc -p .;rollup -c > dist/node.js && BROWSER=true rollup -c > dist/browser.js; cp build/src/*.d.ts dist","fix":"gts fix","pretest":"npm run compile","posttest":"npm run check"},"repository":{"type":"git","url":"git+https://github.com/no2chem/bigint-buffer.git"},"bugs":{"url":"https://github.com/no2chem/bigint-buffer/issues"},"keywords":["bigint","bignum","tc39-bigint","napi"],"license":"Apache-2.0","dependencies":{"bindings":"^1.3.0"},"devDependencies":{"@types/benchmark":"^1.0.31","@types/chai":"^4.1.4","@types/mocha":"^5.2.5","@types/node":"^10.7.1","benchmark":"^2.1.4","chai":"^4.1.2","coveralls":"^3.0.2","gts":"^0.5.4","istanbul":"^0.4.1","karma":"^3.0.0","karma-chrome-launcher":"^2.2.0","karma-env-preprocessor":"^0.1.1","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-webpack":"^3.0.0","microtime":"^2.1.8","mocha":"^5.2.0","pre-commit":"^1.2.2","rollup":"^0.65.2","rollup-plugin-replace":"^2.0.0","ts-loader":"^4.5.0","ts-node":"^7.0.1","typedoc":"^0.12.0","typescript":"github:calebsander/TypeScript#feature/bigint-lkg","webpack":"^4.16.5","webpack-cli":"^3.1.0"},"engines":{"node":">= 0.10.0"},"publishConfig":{"access":"public"},"contributors":[{"name":"Michael Wei","email":"mwei@vmware.com","url":"https://github.com/no2chem"}],"gitHead":"cdba1b9ee1a274424ef73ee1c62665cdaa6fc228","homepage":"https://github.com/no2chem/bigint-buffer#readme","_id":"bigint-buffer@0.1.3","_npmVersion":"6.4.1","_nodeVersion":"10.10.0","_npmUser":{"name":"no2chem","email":"mwei@cs.ucsd.edu"},"dist":{"shasum":"87704c0bb08ce3132a818c0a6c40ec72c0e604e9","size":121249,"noattachment":false,"key":"/bigint-buffer/-/bigint-buffer-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/bigint-buffer/download/bigint-buffer-0.1.3.tgz"},"maintainers":[{"name":"no2chem","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bigint-buffer_0.1.3_1536781215971_0.39369085258106074"},"_hasShrinkwrap":false,"publish_time":1536781216242,"_cnpm_publish_time":1536781216242,"_cnpmcore_publish_time":"2021-12-16T10:06:02.559Z","hasInstallScript":true},"0.1.2":{"name":"bigint-buffer","version":"0.1.2","description":"bigint to buffer conversion with native support","main":"dist/node.js","browser":{"dist/node.js":"dist/browser.js"},"types":"dist/index.d.ts","scripts":{"test":"npm run test:node && npm run test:browser","coverage":"istanbul cover ./test/index.js","coveralls":"npm run coverage && coveralls <coverage/lcov.info","lint":"gts check","install":"npm run rebuild || echo \"Couldn't build bindings. Non-native version used.\"","prepare":"npm run compile","prepublishOnly":"rm -rf build/Release; rm build/Makefile; rm build/gyp-*; rm build/*.mk; rm build/*.Makefile; rm *.tgz","test:browser":"karma start karma.conf.js","test:node":"mocha -r ts-node/register src/**/*.spec.ts --timeout 40000","benchmark":"node -r ts-node/register src/index.bench.ts","typedoc":"typedoc --out docs $(pwd)/src $(pwd)/helper --target es6 --mode file --tsconfig ./tsconfig.json --excludePrivate --excludeProtected --excludeNotExported --exclude '**/*+(spec|bench).ts'","rebuild":"node-gyp rebuild","check":"gts check","clean":"gts clean","compile":"mkdir -p dist; tsc -p .;rollup -c > dist/node.js && BROWSER=true rollup -c > dist/browser.js; cp build/src/*.d.ts dist","fix":"gts fix","pretest":"npm run compile","posttest":"npm run check"},"repository":{"type":"git","url":"git+https://github.com/no2chem/bigint-buffer.git"},"bugs":{"url":"https://github.com/no2chem/bigint-buffer/issues"},"keywords":["bigint","bignum","tc39-bigint","napi"],"license":"Apache-2.0","dependencies":{},"devDependencies":{"@types/benchmark":"^1.0.31","@types/chai":"^4.1.4","@types/mocha":"^5.2.5","@types/node":"^10.7.1","benchmark":"^2.1.4","chai":"^4.1.2","coveralls":"^3.0.2","gts":"^0.5.4","istanbul":"^0.4.1","karma":"^3.0.0","karma-chrome-launcher":"^2.2.0","karma-env-preprocessor":"^0.1.1","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-webpack":"^3.0.0","microtime":"^2.1.8","mocha":"^5.2.0","pre-commit":"^1.2.2","rollup":"^0.65.2","rollup-plugin-replace":"^2.0.0","ts-loader":"^4.5.0","ts-node":"^7.0.1","typedoc":"^0.12.0","typescript":"github:calebsander/TypeScript#feature/bigint-lkg","webpack":"^4.16.5","webpack-cli":"^3.1.0"},"publishConfig":{"access":"public"},"contributors":[{"name":"Michael Wei","email":"mwei@vmware.com","url":"https://github.com/no2chem"}],"gitHead":"ad7dc3a25f969d9530f1ecd89306e4ba9f424074","homepage":"https://github.com/no2chem/bigint-buffer#readme","_id":"bigint-buffer@0.1.2","_npmVersion":"6.4.1","_nodeVersion":"10.10.0","_npmUser":{"name":"no2chem","email":"mwei@cs.ucsd.edu"},"dist":{"shasum":"193d0f29abd31677b693f36726fd63a64c56df77","size":121228,"noattachment":false,"key":"/bigint-buffer/-/bigint-buffer-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/bigint-buffer/download/bigint-buffer-0.1.2.tgz"},"maintainers":[{"name":"no2chem","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bigint-buffer_0.1.2_1536779793754_0.31494835851912506"},"_hasShrinkwrap":false,"publish_time":1536779794037,"_cnpm_publish_time":1536779794037,"_cnpmcore_publish_time":"2021-12-16T10:06:03.477Z","hasInstallScript":true},"0.1.1":{"name":"bigint-buffer","version":"0.1.1","description":"bigint to buffer conversion with native support","main":"build/src/node.js","browser":{"build/src/node.js":"build/src/browser.js"},"types":"build/src/index.d.js","scripts":{"test":"npm run test:node && npm run test:browser","coverage":"istanbul cover ./test/index.js","coveralls":"npm run coverage && coveralls <coverage/lcov.info","lint":"gts check","install":"npm run rebuild || echo \"Couldn't build bindings. Non-native version used.\"","prepare":"npm run compile","prepublishOnly":"rm -rf build/Release; rm build/Makefile; rm build/gyp-*; rm build/*.mk; rm build/*.Makefile","test:browser":"karma start karma.conf.js","test:node":"mocha -r ts-node/register src/**/*.spec.ts --timeout 40000","benchmark":"node -r ts-node/register src/index.bench.ts","typedoc":"typedoc --out docs $(pwd)/src $(pwd)/helper --target es6 --mode file --tsconfig ./tsconfig.json --excludePrivate --excludeProtected --excludeNotExported --exclude '**/*+(spec|bench).ts'","rebuild":"node-gyp rebuild","check":"gts check","clean":"gts clean","compile":"mkdir -p dist; tsc -p .;rollup -c > dist/node.js && BROWSER=true rollup -c > dist/browser.js","fix":"gts fix","pretest":"npm run compile","posttest":"npm run check"},"repository":{"type":"git","url":"git+https://github.com/no2chem/bigint-buffer.git"},"bugs":{"url":"https://github.com/no2chem/bigint-buffer/issues"},"keywords":["bigint","bignum","tc39-bigint","napi"],"license":"Apache-2.0","dependencies":{},"devDependencies":{"@types/benchmark":"^1.0.31","@types/chai":"^4.1.4","@types/mocha":"^5.2.5","@types/node":"^10.7.1","benchmark":"^2.1.4","chai":"^4.1.2","coveralls":"^3.0.2","gts":"^0.5.4","istanbul":"^0.4.1","karma":"^3.0.0","karma-chrome-launcher":"^2.2.0","karma-env-preprocessor":"^0.1.1","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-webpack":"^3.0.0","microtime":"^2.1.8","mocha":"^5.2.0","pre-commit":"^1.2.2","rollup":"^0.65.2","rollup-plugin-replace":"^2.0.0","ts-loader":"^4.5.0","ts-node":"^7.0.1","typedoc":"^0.12.0","typescript":"github:calebsander/TypeScript#feature/bigint-lkg","webpack":"^4.16.5","webpack-cli":"^3.1.0"},"publishConfig":{"access":"public"},"contributors":[{"name":"Michael Wei","email":"mwei@vmware.com","url":"https://github.com/no2chem"}],"gitHead":"9f0c839a657b32b18e76f7c1e66cdba6935ee54e","homepage":"https://github.com/no2chem/bigint-buffer#readme","_id":"bigint-buffer@0.1.1","_npmVersion":"6.4.1","_nodeVersion":"10.10.0","_npmUser":{"name":"no2chem","email":"mwei@cs.ucsd.edu"},"dist":{"shasum":"a93f71f2ee3bcbf69fb1965e85e81b54069913d9","size":406070,"noattachment":false,"key":"/bigint-buffer/-/bigint-buffer-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/bigint-buffer/download/bigint-buffer-0.1.1.tgz"},"maintainers":[{"name":"no2chem","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bigint-buffer_0.1.1_1536778238949_0.47503114156968507"},"_hasShrinkwrap":false,"publish_time":1536778239149,"_cnpm_publish_time":1536778239149,"_cnpmcore_publish_time":"2021-12-16T10:06:04.241Z","hasInstallScript":true},"0.1.0":{"name":"bigint-buffer","version":"0.1.0","description":"bigint to buffer conversion with native support","main":"build/src/node.js","browser":{"build/src/node.js":"build/src/browser.js"},"types":"build/src/index.d.js","scripts":{"test":"npm run test:node && npm run test:browser","coverage":"istanbul cover ./test/index.js","coveralls":"npm run coverage && coveralls <coverage/lcov.info","lint":"gts check","install":"npm run rebuild || echo \"Couldn't build bindings. Non-native version used.\"","prepare":"npm run compile","prepublishOnly":"rm -rf build/Release; rm build/Makefile; rm build/gyp-*; rm build/*.mk; rm build/*.Makefile","test:browser":"karma start karma.conf.js","test:node":"mocha -r ts-node/register src/**/*.spec.ts --timeout 40000","benchmark":"node -r ts-node/register src/index.bench.ts","typedoc":"typedoc --out docs $(pwd)/src $(pwd)/helper --target es6 --mode file --tsconfig ./tsconfig.json --excludePrivate --excludeProtected --excludeNotExported --exclude '**/*+(spec|bench).ts'","rebuild":"node-gyp rebuild","check":"gts check","clean":"gts clean","compile":"mkdir -p build/src; tsc -p .;rollup -c > build/src/node.js && BROWSER=true rollup -c > build/src/browser.js","fix":"gts fix","pretest":"npm run compile","posttest":"npm run check"},"repository":{"type":"git","url":"git+https://github.com/no2chem/bigint-buffer.git"},"bugs":{"url":"https://github.com/no2chem/bigint-buffer/issues"},"keywords":["bigint","bignum","tc39-bigint","napi"],"license":"Apache-2.0","dependencies":{},"devDependencies":{"@types/benchmark":"^1.0.31","@types/chai":"^4.1.4","@types/mocha":"^5.2.5","@types/node":"^10.7.1","benchmark":"^2.1.4","chai":"^4.1.2","coveralls":"^3.0.2","gts":"^0.5.4","istanbul":"^0.4.1","karma":"^3.0.0","karma-chrome-launcher":"^2.2.0","karma-env-preprocessor":"^0.1.1","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-webpack":"^3.0.0","microtime":"^2.1.8","mocha":"^5.2.0","pre-commit":"^1.2.2","rollup":"^0.65.2","rollup-plugin-replace":"^2.0.0","ts-loader":"^4.5.0","ts-node":"^7.0.1","typedoc":"^0.12.0","typescript":"github:calebsander/TypeScript#feature/bigint-lkg","webpack":"^4.16.5","webpack-cli":"^3.1.0"},"publishConfig":{"access":"public"},"contributors":[{"name":"Michael Wei","email":"mwei@vmware.com","url":"https://github.com/no2chem"}],"gitHead":"f342a4a746ffc3c4a543188a0216d9f05b7c7cc7","homepage":"https://github.com/no2chem/bigint-buffer#readme","_id":"bigint-buffer@0.1.0","_npmVersion":"6.4.1","_nodeVersion":"10.10.0","_npmUser":{"name":"no2chem","email":"mwei@cs.ucsd.edu"},"dist":{"shasum":"c18244dc81af87e4c102f7ccf618901d892be806","size":406665,"noattachment":false,"key":"/bigint-buffer/-/bigint-buffer-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/bigint-buffer/download/bigint-buffer-0.1.0.tgz"},"maintainers":[{"name":"no2chem","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bigint-buffer_0.1.0_1536771340474_0.7377775099208577"},"_hasShrinkwrap":false,"publish_time":1536771340650,"_cnpm_publish_time":1536771340650,"_cnpmcore_publish_time":"2021-12-16T10:06:05.009Z","hasInstallScript":true}},"readme":"# ???????? bigint-buffer: Buffer Utilities for TC39 BigInt Proposal \n[![NPM Package](https://img.shields.io/npm/v/bigint-buffer.svg?style=flat-square)](https://www.npmjs.org/package/bigint-buffer)\n[![Build Status](https://img.shields.io/travis/com/no2chem/bigint-buffer.svg?branch=master&style=flat-square)](https://travis-ci.com/no2chem/bigint-buffer)\n[![Coverage Status](https://img.shields.io/coveralls/no2chem/bigint-buffer.svg?style=flat-square)](https://coveralls.io/r/no2chem/bigint-buffer)\n![node](https://img.shields.io/node/v/bigint-buffer.svg?style=flat-square)\n\n[bigint-buffer](https://www.npmjs.org/package/bigint-buffer) is a utility converts [TC39 Proposed BigInts](https://github.com/tc39/proposal-bigint) to and from buffers. This utility is necessary because BigInts, as proposed, do not support direct conversion between Buffers (or UInt8Arrays), but rather require conversion from buffers to hexadecimal strings then to BigInts, which is suboptimal. This utility includes N-API bindings, so under node, conversion is performed without generating a hexadecimal string. In the browser, normal string conversion is used.\n\n# Why use BigInts?\n\nBigInts are currently a stage 3 proposal, supported in Node 10 and V8 v6.7. BigInts are primitive arbitrary precision integers, overcoming the limitations of the number type in javascript, which only supports up to 53 bits of precision. \n\nIn many applications, manipulating 64, 128 or even 256 bit numbers is quite common. For example, database identifiers are often 128 bits, and hashes are often 256 bits (If you're looking for hashing support, try out [bigint-hash](https://github.com/no2chem/bigint-hash)). Before BigInts, manipulating these numbers safely required either allocating a Buffer or UInt8Arrays, which is quite expensive compared to a number, since Buffers are allocated on the heap. \n\nBigInts solve this problem by introducing a primitive that can hold\narbitrary precision integers, reducing memory pressure and allowing\nthe runtime to better optimize arithmetic operations. This results in significant performance improvements - 10x-100x for simple equality comparisons (using `===` vs `Buffer.compare()`):\n\n```\nBuffer equality comparison: 11916844±4.23% ops/s 83.91±17.293 ns/op (91 runs)\nbigint equality comparison: 798024851±0.29% ops/s 1.25±0.017 ns/op (91 runs)\n```\n\nBefore BigInts, you probably used a library such as the widely used [bn.js](https://www.npmjs.com/package/bn.js).\nbn.js fares a little better than a plain Buffer, but is still 5-10x slower than the bigint:\n```\nBN equality comparison: 73255774±0.67% ops/s 13.65±0.442 ns/op (89 runs)\n```\n\nbigints are also much better with arithmetic, here are the results compared to BN for multiplying two\n128-bit integers, yielding a 4x improvement:\n```\nBN multiply: 4763236±0.49% ops/s 209.94±5.111 ns/op (93 runs)\nbigint multiply: 15268666±0.92% ops/s 65.49±2.938 ns/op (92 runs)\n```\n\n# So what's the problem?\n\nBigInts, unfortunately lack an efficient way to be converted back and forth between buffers. When dealing with serialized data or legacy node code, you'll often want to generate a BigInt from a buffer, or convert a BigInt to a Buffer in order to send a BigInt over the wire.\n\nCurrently, the only method to generate a new BigInt is with the BigInt constructor. Unfortunately, it doesn't support Buffers, though it may in the future:\n\n```\n> BigInt(Buffer.from([1]))\nSyntaxError: Cannot convert  to a BigInt\n```\n\nInstead, you need to convert the Buffer to a hexadecimal string of the correct format. For example:\n\n```\n> BigInt(`0x${buf.toString('hex')}`);\n1n\n```\n\nThese conversions are not only quite expensive, but obviate a lot of the performance gains we get from BigInts. For example, on a large buffer, this conversion can take over 100x the time to do a comparison:\n```\nbigint from hex string from buffer (huge): 1230607±1.02% ops/s 812.61±40.013 ns/op (89 runs)\n```\n\n# And... bigint-buffer helps how?\n\nbigint-buffer introduces four functions for conversion between buffers and bigints. A small example follows:\n```typescript\nimport {toBigIntBE, toBigIntLE, toBufferBE, toBufferLE} from 'bigint-buffer';\n\n// Get a big endian buffer of the given width\ntoBufferBE(0xdeadbeefn, 8);\n// ↪ <Buffer 00 00 00 00 de ad be ef>\n\n// Get a little endian buffer of the given width\ntoBufferLE(0xdeadbeefn, 8);\n// ↪ <Buffer ef be ad de 00 00 00 00>\n\n// Get a BigInt from a buffer in big endian format\ntoBigIntBE(Buffer.from('deadbeef', 'hex'));\n// ↪ 3735928559n (0xdeadbeefn)\n\n// Get a BigInt from a buffer in little endian format\ntoBigIntLE(Buffer.from('deadbeef', 'hex'));\n// ↪ 4022250974n (0xefbeadd0en)\n```\n\nbigint-buffer uses N-API native bindings to perform the conversion efficiently without generating the\nimmediate hex strings necessary in pure javascript. This results in a significant performance increase,\nabout 2x for small buffer to bigint conversions, and 8x better than BN:\n\n```\nBN to buffer (small): 981703±68.30% ops/s 1018.64±3194.648 ns/op (81 runs)\nbigint from hex string from buffer (small): 2804915±5.00% ops/s 356.52±85.371 ns/op (88 runs)\nLE bigint-buffer ToBigInt (small): 5932704±1.62% ops/s 168.56±12.971 ns/op (87 runs)\n```\n\nAnd about 3.3x for bigint to buffer conversions, and 17x better than BN:\n```\nBN to buffer (large): 339437±2.85% ops/s 2946.06±385.504 ns/op (81 runs)\nBE bigint to hex string to buffer (large): 1714292±1.35% ops/s 583.33±37.995 ns/op (90 runs)\nBE bigint-buffer to buffer (large, truncated): 5977218±4.68% ops/s 167.30±37.284 ns/op (87 runs)\n```\n\nYou can run the benchmarks by running `npm run benchmark`.\n\n# Typescript Support\n\nbigint-buffer supplies typescript bindings, but BigInts are still not supported in typescript, though\na pull request has been opened, so support should be coming soon. If you are using typescript,\n@calebsander has put up a pull request and the instructions in [this post](https://github.com/Microsoft/TypeScript/issues/15096#issuecomment-419654748).\n\n# Install\n\nAdd bigint-buffer to your project with:\n\n> `npm install bigint-buffer`\n\n# Documentation\n\nBasic API documentation can be found [here](https://no2chem.github.io/bigint-buffer/). Note that v1.0.0 changes\nthe name of the original functions to meet style guidelines.\n\n# Benchmarks\n\nBenchmarks can be run by executing `npm run benchmark` from the package directory.\n","_attachments":{},"homepage":"https://github.com/no2chem/bigint-buffer#readme","bugs":{"url":"https://github.com/no2chem/bigint-buffer/issues"},"license":"Apache-2.0"}