{"_id":"longfn","_rev":"5-30f2163e9cca03dcd21cf8f8ab8ab35b","name":"longfn","dist-tags":{"latest":"1.3.1"},"versions":{"1.0.0":{"name":"longfn","version":"1.0.0","description":"Rewritten variant of long.js that is entirely functional (and faster because of it)","main":"index.js","scripts":{"build":"node build","lint":"standard","types":"npx tsd","test":"npm run lint && npm run cover && npm run perf && npm run types","perf":"npm run perf:wasm && npm run perf:js","perf:wasm":"node test/perf.js","perf:js":"node --noexpose_wasm test/perf.js","unit":"npm run lint && npm run test:wasm && npm run test:js","unit:wasm":"node test/index.js","unit:js":"node --noexpose_wasm test/index.js","verbose":"env TEST_VERBOSE=1 npm run unit","cover":"npm run cover:wasm && npm run cover:js && npm run cover:report","cover:wasm":"nyc --silent --no-clean npm run unit:wasm","cover:js":"nyc --silent --no-clean npm run unit:js","cover:report":"nyc report --reporter=lcov --reporter=html"},"keywords":["math","long","functional","int64","uint64"],"author":{"name":"Martin Heidegger","email":"martin.heidegger@gmail.com"},"license":"APL","devDependencies":{"long":"^4.0.0","nyc":"^15.1.0","secure-shuffle":"^2.0.0","standard":"^14.3.4","tape":"^5.0.1","tsd":"^0.13.1","wat2wasm":"^3.0.0"},"gitHead":"1b36378b2436db324acb843d4295ff981d399452","_id":"longfn@1.0.0","_nodeVersion":"12.16.1","_npmVersion":"6.14.8","dist":{"integrity":"sha512-oHNapTWLuC66f0m5A1NJe2Dk+yv9/uehTNscE30HQzx1t1NDqjXcyIOFMlw9CRPAAz2msCUJx99yqzdKbWe1tA==","shasum":"45c6420e8ae9a3162a3287dabd41037d9ae49846","tarball":"https://registry.npmjs.org/longfn/-/longfn-1.0.0.tgz","fileCount":8,"unpackedSize":168247,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfVnbGCRA9TVsSAnZWagAAuaoP/3aE8QcQcqg4Kg+QvbHm\nDoQ24lVgT6+g29bgPfrq7elCiEu3p+UZ33ZW5mgVEd08WlVW9Oz3v3tXxbcv\nkGMajaZaHRik3xUjwUNKMMgUQdgR086GILcTB7MQ8nqCFOK2k2Ab4pD4O/OH\n3Te0s8bVXljyFtVA6gF9kF1R9uGVJufxl90xCyBfP3E1WljFykvWNZ/quci/\nM55tM6AtJjVUlQrvl64Xixm5C9LhIiEPEsMRUygtcPG9oNXzvVoU/ce+ZjcF\niTRH0UdkJcHdBOB1wB8QdUl7hpfRpGIOvbOjGNw/xdecrb1hZ6IjJakukUiF\nF2dCp/DzmagsL3u6dpYqu9CJHJUz9Cb9aXqKWWjgC1/mwHJS+ftWlbrTcO/9\n4U+E5zSepIzQAt5picnWvjMsvg10PLw7aTAO8hYWmH45opuYdBKtHGBgjM2H\nyxqVbZjPHNgy91TEQFOX56PePljWv1wh1IV7KpeDwNP+ar7ZsLuVOcKT2iJD\nd501LILsFGVyIYhoxl8x/s0FrjQcDWZmAstfPsduG5Nf7meXHFW+Uk1RHITE\njUKWNKW/o92YN+yz/DFE5SR84htPHxsYcmnkYQM9UHUk3P0QFa0mDtOZrVrV\ngbbDJOiNQaR4iPcyDd75LsM+xf5nsB7imWY+UU2Nn7QrBdO8O7oS5ntIAwRt\nCovh\r\n=Ot6k\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDcE67upRvGepcELEij1lftJSjmkgiqXrnXbrm4zI9WfwIhAP/2WSxYNGYJz8LH+dmnk60S7VQ+TVQ25otyVZ0xM9os"}]},"maintainers":[{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"}],"_npmUser":{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/longfn_1.0.0_1599502022413_0.6925857059038183"},"_hasShrinkwrap":false},"1.1.0":{"name":"longfn","version":"1.1.0","description":"Rewritten variant of long.js that is entirely functional (and faster because of it)","main":"index.js","type":"commonjs","types":"index.d.ts","scripts":{"lint":"standard","types":"npx tsd","test":"npm run lint && npm run cover && npm run perf && npm run types","perf":"npm run perf:wasm && npm run perf:js","perf:wasm":"node test/perf.js","perf:js":"node --noexpose_wasm test/perf.js","unit":"node test/index.js","verbose":"env TEST_VERBOSE=1 npm run unit","cover":"nyc --reporter=lcov --reporter=html npm run unit"},"keywords":["math","long","functional","int64","uint64"],"author":{"name":"Martin Heidegger","email":"martin.heidegger@gmail.com"},"license":"APL","devDependencies":{"long":"^4.0.0","nyc":"^15.1.0","secure-shuffle":"^2.0.0","standard":"^16.0.3","tape":"^5.1.0","tsd":"^0.14.0"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/consento-org/longfn.git"},"bugs":{"url":"https://github.com/consento-org/longfn/issues"},"homepage":"https://github.com/consento-org/longfn#readme","gitHead":"2c6c26aaebfcfb03b8490306fb4d5dcb319a5aa5","_id":"longfn@1.1.0","_nodeVersion":"15.3.0","_npmVersion":"7.0.14","dist":{"integrity":"sha512-WnrejPGKlvgHSG4H5PbzaRBhRALbyW3xtPgGLC95Q5+v4ipWTMKU+a9kB/k3HAUeBwKSOnGnX6UveY+NHdfLEw==","shasum":"161a1579efcb5cad6dc2cf0b8abec685688de463","tarball":"https://registry.npmjs.org/longfn/-/longfn-1.1.0.tgz","fileCount":8,"unpackedSize":175235,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7duLCRA9TVsSAnZWagAAUIAP/jXE0DERVT4qJzocx1eN\n6qKI76x2sX6mQeJOKK4CJ3Sr/aUK4EjHzvFNd/0ZBNY+SAKF7JLjyX+pQ0PX\nRW/sRAEvTN+ajSshO6hy8oSs19GV23lG7B+xS+u2eMmPnLvbPrrihPN+5aEJ\nkGixLSdyEOMykwTCcKvBjSiWl/7i4HEYqrS4O8IEGaMjWWBDvVguAxZT+WMq\nqXwMedYu/6rVUfHVrdSPgGNA9Dp7rNfPc+3BhSSdK1c40Mc0jTlzxIEeVj8v\nv5hl8NE7YxmsP0Vr+lsYneNuQ71gmIwAJ19tb0DuDQt0+8wA8mbDha9xXBGr\n0yZnGFaBwarzae8xJcECf7wBFRxnzz1uffVeosy8XQWyLpCTrzpWtGBK0AWk\nwo+aIsBEBhr7O+TguUQBgP9Hc9gLg7fWlTQThmyXGwzK2AGQm7BFcz6Pmyj4\nKAm9ETq9CstJS8BfhIKl7JOleIYjKqqm9L9Qet7Bbg6RdnC2yoD1LuW3riQp\nh8Pf8XNGGpP+dEmmeZgyDY1pg+tO4bPUGF+3suj8BV0FST/Zo+Erv4+dqu9W\niY9OB2n0cWOtUlbi4VYalNXYDVjC9jYcf16iI+L1DL4d2xfCCXySsQFPNzqB\nroQAYDV3XWmlrx/xxXmgaSsXQY8XgESDAiclBD2poDzXYkqHvA7GVCEO6Vpp\naGdg\r\n=AZR1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkYGdbBPX974BE6MXU0FGCBhh3sHQTGXBuB3xINhwlXwIhAItZl11Pdezi3dWKsddEcvmgLHc//YeDK0vi8GfuC8N3"}]},"_npmUser":{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"},"maintainers":[{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/longfn_1.1.0_1609423747716_0.03643800533632624"},"_hasShrinkwrap":false},"1.2.0":{"name":"longfn","version":"1.2.0","description":"Rewritten variant of long.js that is entirely functional (and faster because of it)","main":"index.js","type":"commonjs","types":"index.d.ts","scripts":{"lint":"standard","types":"npx tsd","test":"npm run lint && npm run cover && npm run perf && npm run types","perf":"npm run perf:wasm && npm run perf:js","perf:wasm":"node test/perf.js","perf:js":"node --noexpose_wasm test/perf.js","unit":"node test/index.js","verbose":"env TEST_VERBOSE=1 npm run unit","cover":"nyc --reporter=lcov --reporter=html npm run unit"},"keywords":["math","long","functional","int64","uint64"],"author":{"name":"Martin Heidegger","email":"martin.heidegger@gmail.com"},"license":"APL","devDependencies":{"long":"^4.0.0","nyc":"^15.1.0","secure-shuffle":"^2.0.0","standard":"^16.0.3","tape":"^5.1.0","tsd":"^0.14.0"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/consento-org/longfn.git"},"bugs":{"url":"https://github.com/consento-org/longfn/issues"},"homepage":"https://github.com/consento-org/longfn#readme","gitHead":"17ba42ad849dbf4d05b38b21cf9daba8a9a65f95","_id":"longfn@1.2.0","_nodeVersion":"15.8.0","_npmVersion":"7.5.4","dist":{"integrity":"sha512-NZVxOy7Cxf7wb5lU8EQtxO9psA1BuCAbnukRDzYAJJUKv2AN+Flp+pddW0cnxZ8vjotR8db3as4rgUUHI/yd6g==","shasum":"ce966e1baaaf550891b829f830511c585cc3b9f5","tarball":"https://registry.npmjs.org/longfn/-/longfn-1.2.0.tgz","fileCount":8,"unpackedSize":175632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjT+LCRA9TVsSAnZWagAAlEYP/iP7fBDQTRo+Oceqlfg9\nEswjey/sxi2gwPH0k9UHOaCOR+gXYW2V6adhDAi4wh9+jwyMFCA01QwAgQCO\nYS+ZEqZ8zN1CN/zMBE6Hp0tiVLPadcMMH/1Jv0SwBD9R7NtCCY0lTnS7ROUL\nlFinLwZpV/pJQaPjuVfsIt0IVsQKHztbpf7mvkDCW9w4yZkRo2FFbyRUDl+s\n7i84Sp+mhbXSf/06zeHlGHLneffaxrHpXmyeL6XUw8/qLi62gCtLcpqMv4Lt\nCnXc8rh1cN1B0OQjKHHMC2o89YFJ7u4FEJWSDhZP7QF6o13I2SSt76p/z51Q\nFGDULLcuLMySXQwlZ97DAuzEqphCkJwgzLH8C/lyGTehefybqP0fuaiScboe\nrIwHhgEXayxeKMVgg1fuwzsqkiKse1fQrRVAJlSrS+zSXonjQhdAYB22W4tT\n72EtaZ77UaugUdz4Kh0BFFPcvMKfU330Myf0uro/wuxg+Vs3pqjkd+z/h2YJ\nzIzhzuMUv87BTOO2ccwLcs6GYhuVk8LgfbArMrz/oe/h4xVlwIGNDbIQg326\nEhhJfYGONNLGpH2ynFtiHLcNkxMt/pJRtl8QTSFj85lQo64PuJgt4GrmAN7O\n/HekkPtY0b9lIib3XXgtUOTvNDg9jUGB8VrQd2CRRnKGl57hKvFV9twnMnBG\nSKvb\r\n=BcuK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpevXfRBOsr6e5Usy8sKzXfvSA/IZQ7I4SCRd0Y8BzyQIhAJ1AEmxlyvCpbkXW7wChqIdQUb5tdUextLiEdmm+OXjM"}]},"_npmUser":{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"},"maintainers":[{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/longfn_1.2.0_1619869579427_0.5000212060926947"},"_hasShrinkwrap":false},"1.3.0":{"name":"longfn","version":"1.3.0","description":"Rewritten variant of long.js that is entirely functional (and faster because of it)","main":"index.js","type":"commonjs","types":"index.d.ts","exports":{".":{"import":"./index.mjs","require":"./index.js","types":"./index.d.ts"}},"scripts":{"lint":"standard","types":"npx tsd","prepare":"npm run test","build":"esm2umd longfn index.mjs > index.js","test":"npm run lint && npm run cover && npm run perf && npm run types","perf":"npm run perf:wasm && npm run perf:js","perf:wasm":"node test/perf.js","perf:js":"node --noexpose_wasm test/perf.js","unit":"npm run build; node test/index.js","verbose":"env TEST_VERBOSE=1 npm run unit","cover":"c8 --reporter=lcov --reporter=html npm run unit"},"standard":{"ignore":["index.js","*.ts"]},"keywords":["math","long","functional","int64","uint64"],"author":{"name":"Martin Heidegger","email":"martin.heidegger@gmail.com"},"license":"APL","devDependencies":{"c8":"^7.11.0","esm2umd":"^0.2.0","long":"^5.2.0","secure-shuffle":"^2.0.0","standard":"^16.0.4","tape":"^5.5.2","tsd":"^0.19.1"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/consento-org/longfn.git"},"bugs":{"url":"https://github.com/consento-org/longfn/issues"},"homepage":"https://github.com/consento-org/longfn#readme","gitHead":"54de724ff6c8294911200b9b513a381930486d20","_id":"longfn@1.3.0","_nodeVersion":"14.17.5","_npmVersion":"6.14.14","dist":{"integrity":"sha512-yi79EPs1VWw8/x/IhRmbcHQ4u9B+K8N9scAG9LJqlOH5lI0o2NGiBK3aglL4F+U4mDVFGKvvRTv+25/MJhAI/g==","shasum":"de5680d4b2d28282b28519d77d9ae4251e3f32ec","tarball":"https://registry.npmjs.org/longfn/-/longfn-1.3.0.tgz","fileCount":9,"unpackedSize":240408,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiN2yHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpKPA/8CKAWugUw5zMII2nrGpM0HNXS6fRZYXiJNTe41kj6YrZ7TRbW\r\nNEsqxUPZwNyaxmaXU0FAmCdR5jj/UFcBTTAntuC0VmhyyX2xhAyj1iMVvdoN\r\nDp2gE+VLUBbX+nFv9bH8f7D8YTfXXnPRtQfAEEY+LfSFSU0UdaWOlt2PKrjT\r\ngj0pImmQZHntcjtQeqNKv3SMwQeIytYvaUim+iXx6GMPasyrDLNCtxxhklP6\r\n0sM5yw5MrNX0dhF2LD8oigC8AyjnBj8mtxd7KB9vSf/VjJXlxWhI4056KP5e\r\nxvAFqa/DsumH/StWgqJtNzYYKG/N1pz+hPkDU8RPuI4cKbZiUj8SBdqZgzTy\r\nVUTRmRBtwL5I1nWchMVNocnhA2Wc/mLYPaqhYJGUZNdg8IDriTNIjQqPB6vP\r\nNc2L0zBG884DaO5bQ2Pl5DySRs+nwJaXbUF/XQshEb3t9fztqItsi7Evpgca\r\nfydn8XU/m2cxBMtHsQPFqt5cNV30390KsuEnM3Ar0CdkjNfPUfgP0pGuUa8I\r\njtAMUZ0RAxjf/6CyW9Uyl7czCudhsB+WcstPfYPGKHpTonUdeUDBpj94p+AN\r\npQQ9bEeP/wWIL9DlRQPPT2VTR+qPStSktXwu+FtfIR0BRiwDPfJw88Xox4n/\r\nCyxyRgHqbPK2htDCNLEITpW36aOjH+aA02E=\r\n=PX3A\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICXkzG569ZjBU8WM1kEeUV+DklLkiPNz30BSM1epQTgpAiEA1u/d3ljQKn9jZIQ7UF8N5+igAePZV3uJ0IB4tuh+fK0="}]},"_npmUser":{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"},"maintainers":[{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/longfn_1.3.0_1647799431010_0.527260825276235"},"_hasShrinkwrap":false},"1.3.1":{"name":"longfn","version":"1.3.1","description":"Rewritten variant of long.js that is entirely functional (and faster because of it)","main":"index.js","type":"commonjs","types":"index.d.ts","exports":{".":{"import":"./index.mjs","require":"./index.js","types":"./index.d.ts"}},"scripts":{"lint":"standard","types":"npx tsd","prepare":"npm run test","build":"esm2umd longfn index.mjs > index.js","test":"npm run lint && npm run cover && npm run perf && npm run types","perf":"npm run perf:wasm && npm run perf:js","perf:wasm":"node test/perf.js","perf:js":"node --noexpose_wasm test/perf.js","unit":"npm run build; node test/index.js","verbose":"env TEST_VERBOSE=1 npm run unit","cover":"c8 --reporter=lcov --reporter=html npm run unit"},"standard":{"ignore":["index.js","*.ts"]},"keywords":["math","long","functional","int64","uint64"],"author":{"name":"Martin Heidegger","email":"martin.heidegger@gmail.com"},"license":"APL","devDependencies":{"c8":"^7.11.0","esm2umd":"^0.2.0","long":"^5.2.0","secure-shuffle":"^2.0.0","standard":"^16.0.4","tape":"^5.5.2","tsd":"^0.19.1"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/consento-org/longfn.git"},"bugs":{"url":"https://github.com/consento-org/longfn/issues"},"homepage":"https://github.com/consento-org/longfn#readme","gitHead":"b6f02758ba999dfcc0b8baec5475bd071608e1c2","_id":"longfn@1.3.1","_nodeVersion":"14.17.5","_npmVersion":"6.14.14","dist":{"integrity":"sha512-sFNpfHBvO+mK6bSMr//CGeeXCJX4nKaBJ9M7QsJkzZT8ez+z12lkzRlyZibjdtjLHlfYPv9rmwHGGuwJOglFFQ==","shasum":"1655fef1034bcb9f7b7911a4afb493d4acc8751d","tarball":"https://registry.npmjs.org/longfn/-/longfn-1.3.1.tgz","fileCount":9,"unpackedSize":242533,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiN9flACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrwXQ/7BR+epAfHtFb44PNNA91YuyXLHKJ+s4/hiKet8x2FfsxSonIM\r\n3ilijvTzoM1LWJABEvUpgIiv8OaVqpRzq5mg0S6Ub8cT+c5qrcluaEgxDoyZ\r\nc1K9kKPZpfYKUEbktwwxOH5fWdxw8pHAl/RKbFS0YWKFPQ79IE+Uqc+qAebN\r\nQdnRf9V56JneV7YJm1kD2WXYabk9o7Qtg7eZcFb9bdixHq2V4kizkk+dhIYB\r\nne+lfkzkPIyZviFf1MS+98MiY2eIpZM+/A4NoreYN14NBMRTkNsOJbS5jGEy\r\nJssGK9A76yNChYnzZliGex4C1G0T7cxx768R582EChlGZm8XXaK7qvGUjIRz\r\n5nNs5CVGJrxFcIDOyRY60BQVVilasVGqwBkEUGz4SYiaP/FqUcAzOa1Kp3E5\r\nhI3wXudKsKhi9bs+f4bx/MpkCZW8b4ZqljY1duVJnGJtdqEgYrV+2Hneypk7\r\nElfKk6AIQOIwwsMV9rox0kSKXxgbKM1M0xvtDX43YS5eAYG8JASZc5h//sO8\r\nenxmnDsOTnsyL9fagrFbEUSCxU73My0nYwi6pw7/J1wNex04ltL8SKUz4D6G\r\nZv/nECffayHHsl0QRCW8hFn2yBpJnloTexmBH8TGWXEVRd5aJpaG1nu8GubC\r\nagfMIMDduYMMz4oaE0s7LAoIpZH/AKIN5zM=\r\n=Tt7P\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICpmIrjMtyKXNJonkG/raS8pf21gYHSwMYdO7qoSFeo+AiEA0P7C5qaNyNEnByPd/KQ2aIWkpyXyZWcta67nLE9QXiU="}]},"_npmUser":{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"},"maintainers":[{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/longfn_1.3.1_1647826917413_0.23181466837194908"},"_hasShrinkwrap":false}},"time":{"created":"2020-09-07T18:07:02.412Z","1.0.0":"2020-09-07T18:07:02.508Z","modified":"2022-05-08T10:11:37.659Z","1.1.0":"2020-12-31T14:09:07.944Z","1.2.0":"2021-05-01T11:46:19.544Z","1.3.0":"2022-03-20T18:03:51.183Z","1.3.1":"2022-03-21T01:41:57.604Z"},"maintainers":[{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"}],"description":"Rewritten variant of long.js that is entirely functional (and faster because of it)","keywords":["math","long","functional","int64","uint64"],"author":{"name":"Martin Heidegger","email":"martin.heidegger@gmail.com"},"license":"APL","readme":"# longfn\n\nLongfn is an adaptation of [`long.js`](https://github.com/dcodeIO/long.js#readme)\nwhich is functional and faster because of it.\n\n## Usage\n\n```javascript\nconst { fromInt, mul } = require('longfn')\n\nconst result = fromInt(0)\nconst base = fromInt(2)\nconst multiplier = fromInt(3)\nmul(base, multiplier, result)\n\nconsole.log(result) // { low: 6, high: 0, unsigned: false }\n```\n\n## Rationale\n\n`long.js` has done an amazing job providing 64bit integer operations in\nthe 32bit environment of JavaScript, but we noticed that the performance\ncould be improved.\n\nThe `long.js` library and google libraries require the use of class instances\nfor operations `base = new Long(1, 0)` and they require that the instances are\nimmutable `result = base.mul(multiplier)` which means that at least three instances\nneed to be created for every multiplication operation. A closer look at the\nimplementation reveals that several instances might be created and sent to the\ngarbage collector in the process of one operation. Causing significant instantiation\nand gc overhead.\n\n`longfn` optimizes on `long.js` by trading developer comfort for speed. The API\nforces the user to think about memory allocation and in exchanges offers flexibility\nin the api use:\n\n```javascript\n// long.js\nconst x = longjs.fromInt(2)\nlet outX = x\nfor (let i = 0; i < 20; i++) {\n  outX = outX.mul(4)\n}\n\nconsole.log(outX)\n\n// longfn\nconst y = longfn.fromInt(2)\nconst mul = longfn.fromInt(4) // long.js hides the casting of 4 into a longjs instance, which is done for every operation!\nconst outY = longfn.clone(y)\nfor (let i = 0; i < 20; i++) {\n  longfn.mul(outY, mul, outY) // note how there is no variable reassignment\n}\n// and the outY memory is just being reused\n\nconsole.log(outY) // { low: 0, high: 512, unsigned: false }\n```\n\nIn this simple example, `long.js` created **38 temporary instances** of `Long`, while the `longfn`\nexample create **no** temporary instance for this operation!\n\nThis should result in a more stable and predictable runtime behavior in games or\ncrypto applications.\n\nIn pratice this resulted in a noticable gain ~30% of `longfn` over `long.js` when wasm is available\nbut a massive **~500% gain** when wasm isnt available!\n\n## State\n\nCurrently longfn is in its first release state, with feature parity with `long.js` and all tests \nof longjs are passing! We are aware that there are several things that should/could be better\ntested and we welcome more tests and praxis reports.\n\nPlease let us know if you find a case where this library does not work for you!\n\n## API\n\nSee [the TypeScript definition](./index.d.ts) for the available functions.\n\n## Background\n\nThe ECMA-262 11th Edition _does_ support [BigInt](https://github.com/tc39/proposal-bigint) numbers, but these\nare of arbitrary size/length. When trying to port an algorithm written in (u)int64 numbers it might be a good\nidea to still have a comparable implementation (such as this) handy.\n\nWith [Webassembly](https://en.wikipedia.org/wiki/WebAssembly)(wasm) becoming a reality in 2017, it has become easier/\npossible to write (u)int64 implementations with JavaScript. But while wasm has been deployed on several\nplatforms, it has yet to reach many minor environments (like [React-Native](https://react-native.canny.io/feature-requests/p/support-wasmwebassembly)).\n\nAs of ECMA-262 5th Edition, \"all the positive and negative integers whose magnitude is no greater than 253 are representable in the Number type\", which is \"representing the doubleprecision 64-bit format IEEE 754 values as specified in the IEEE Standard for Binary Floating-Point Arithmetic\". The maximum safe integer in JavaScript is 253-1.\n\nExample: 264-1 is 18446744073709551615 but in JavaScript it evaluates to 18446744073709552000.\n\nFurthermore, bitwise operators in JavaScript \"deal only with integers in the range −231 through 231−1, inclusive, or in the range 0 through 232−1, inclusive. These operators accept any value of the Number type but first convert each such value to one of 232 integer values.\"\n\nIn some use cases, however, it is required to be able to reliably work with and perform bitwise operations on the full 64 bits. This is where long.js comes into play.\n\n## License\n\n[APL](./LICENSE)\n\nNote: This library has been heavily ported from [`dcodeIO/long.js`](https://github.com/dcodeIO/long.js)\nwhich has also be published under the APL. It also modifies and adapts code - particularly tests - from [`googles long library`](https://google.github.io/closure-library/api/goog.math.Long.html).\n","readmeFilename":"Readme.md","homepage":"https://github.com/consento-org/longfn#readme","repository":{"type":"git","url":"git+https://github.com/consento-org/longfn.git"},"bugs":{"url":"https://github.com/consento-org/longfn/issues"}}