Merge pull request #901 from github/dependabot/npm_and_yarn/long-5.2.0
Bump long from 4.0.0 to 5.2.0
This commit is contained in:
commit
a9da9fc959
14 changed files with 3866 additions and 1796 deletions
5
node_modules/.package-lock.json
generated
vendored
5
node_modules/.package-lock.json
generated
vendored
|
|
@ -4099,8 +4099,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/long": {
|
"node_modules/long": {
|
||||||
"version": "4.0.0",
|
"version": "5.2.0",
|
||||||
"integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
|
"resolved": "https://registry.npmjs.org/long/-/long-5.2.0.tgz",
|
||||||
|
"integrity": "sha512-9RTUNjK60eJbx3uz+TEGF7fUr29ZDxR5QzXcyDpeSfeH28S9ycINflOgOlppit5U+4kNTe83KQnMEerw7GmE8w=="
|
||||||
},
|
},
|
||||||
"node_modules/lowercase-keys": {
|
"node_modules/lowercase-keys": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
|
|
|
||||||
404
node_modules/long/LICENSE
generated
vendored
404
node_modules/long/LICENSE
generated
vendored
|
|
@ -1,202 +1,202 @@
|
||||||
|
|
||||||
Apache License
|
Apache License
|
||||||
Version 2.0, January 2004
|
Version 2.0, January 2004
|
||||||
http://www.apache.org/licenses/
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
1. Definitions.
|
1. Definitions.
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
the copyright owner that is granting the License.
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
other entities that control, are controlled by, or are under common
|
other entities that control, are controlled by, or are under common
|
||||||
control with that entity. For the purposes of this definition,
|
control with that entity. For the purposes of this definition,
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
direction or management of such entity, whether by contract or
|
direction or management of such entity, whether by contract or
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
exercising permissions granted by this License.
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
including but not limited to software source code, documentation
|
including but not limited to software source code, documentation
|
||||||
source, and configuration files.
|
source, and configuration files.
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
"Object" form shall mean any form resulting from mechanical
|
||||||
transformation or translation of a Source form, including but
|
transformation or translation of a Source form, including but
|
||||||
not limited to compiled object code, generated documentation,
|
not limited to compiled object code, generated documentation,
|
||||||
and conversions to other media types.
|
and conversions to other media types.
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
Object form, made available under the License, as indicated by a
|
Object form, made available under the License, as indicated by a
|
||||||
copyright notice that is included in or attached to the work
|
copyright notice that is included in or attached to the work
|
||||||
(an example is provided in the Appendix below).
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
form, that is based on (or derived from) the Work and for which the
|
form, that is based on (or derived from) the Work and for which the
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
of this License, Derivative Works shall not include works that remain
|
of this License, Derivative Works shall not include works that remain
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
the Work and Derivative Works thereof.
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
"Contribution" shall mean any work of authorship, including
|
||||||
the original version of the Work and any modifications or additions
|
the original version of the Work and any modifications or additions
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
means any form of electronic, verbal, or written communication sent
|
means any form of electronic, verbal, or written communication sent
|
||||||
to the Licensor or its representatives, including but not limited to
|
to the Licensor or its representatives, including but not limited to
|
||||||
communication on electronic mailing lists, source code control systems,
|
communication on electronic mailing lists, source code control systems,
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
excluding communication that is conspicuously marked or otherwise
|
excluding communication that is conspicuously marked or otherwise
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
subsequently incorporated within the Work.
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
Work and such Derivative Works in Source or Object form.
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
(except as stated in this section) patent license to make, have made,
|
(except as stated in this section) patent license to make, have made,
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
where such license applies only to those patent claims licensable
|
where such license applies only to those patent claims licensable
|
||||||
by such Contributor that are necessarily infringed by their
|
by such Contributor that are necessarily infringed by their
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
institute patent litigation against any entity (including a
|
institute patent litigation against any entity (including a
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
or contributory patent infringement, then any patent licenses
|
or contributory patent infringement, then any patent licenses
|
||||||
granted to You under this License for that Work shall terminate
|
granted to You under this License for that Work shall terminate
|
||||||
as of the date such litigation is filed.
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
modifications, and in Source or Object form, provided that You
|
modifications, and in Source or Object form, provided that You
|
||||||
meet the following conditions:
|
meet the following conditions:
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
(a) You must give any other recipients of the Work or
|
||||||
Derivative Works a copy of this License; and
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
(b) You must cause any modified files to carry prominent notices
|
||||||
stating that You changed the files; and
|
stating that You changed the files; and
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
that You distribute, all copyright, patent, trademark, and
|
that You distribute, all copyright, patent, trademark, and
|
||||||
attribution notices from the Source form of the Work,
|
attribution notices from the Source form of the Work,
|
||||||
excluding those notices that do not pertain to any part of
|
excluding those notices that do not pertain to any part of
|
||||||
the Derivative Works; and
|
the Derivative Works; and
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
distribution, then any Derivative Works that You distribute must
|
distribution, then any Derivative Works that You distribute must
|
||||||
include a readable copy of the attribution notices contained
|
include a readable copy of the attribution notices contained
|
||||||
within such NOTICE file, excluding those notices that do not
|
within such NOTICE file, excluding those notices that do not
|
||||||
pertain to any part of the Derivative Works, in at least one
|
pertain to any part of the Derivative Works, in at least one
|
||||||
of the following places: within a NOTICE text file distributed
|
of the following places: within a NOTICE text file distributed
|
||||||
as part of the Derivative Works; within the Source form or
|
as part of the Derivative Works; within the Source form or
|
||||||
documentation, if provided along with the Derivative Works; or,
|
documentation, if provided along with the Derivative Works; or,
|
||||||
within a display generated by the Derivative Works, if and
|
within a display generated by the Derivative Works, if and
|
||||||
wherever such third-party notices normally appear. The contents
|
wherever such third-party notices normally appear. The contents
|
||||||
of the NOTICE file are for informational purposes only and
|
of the NOTICE file are for informational purposes only and
|
||||||
do not modify the License. You may add Your own attribution
|
do not modify the License. You may add Your own attribution
|
||||||
notices within Derivative Works that You distribute, alongside
|
notices within Derivative Works that You distribute, alongside
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
that such additional attribution notices cannot be construed
|
that such additional attribution notices cannot be construed
|
||||||
as modifying the License.
|
as modifying the License.
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
You may add Your own copyright statement to Your modifications and
|
||||||
may provide additional or different license terms and conditions
|
may provide additional or different license terms and conditions
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
the conditions stated in this License.
|
the conditions stated in this License.
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
this License, without any additional terms or conditions.
|
this License, without any additional terms or conditions.
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
the terms of any separate license agreement you may have executed
|
the terms of any separate license agreement you may have executed
|
||||||
with Licensor regarding such Contributions.
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
except as required for reasonable and customary use in describing the
|
except as required for reasonable and customary use in describing the
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
implied, including, without limitation, any warranties or conditions
|
implied, including, without limitation, any warranties or conditions
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
appropriateness of using or redistributing the Work and assume any
|
appropriateness of using or redistributing the Work and assume any
|
||||||
risks associated with Your exercise of permissions under this License.
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
unless required by applicable law (such as deliberate and grossly
|
unless required by applicable law (such as deliberate and grossly
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
liable to You for damages, including any direct, indirect, special,
|
liable to You for damages, including any direct, indirect, special,
|
||||||
incidental, or consequential damages of any character arising as a
|
incidental, or consequential damages of any character arising as a
|
||||||
result of this License or out of the use or inability to use the
|
result of this License or out of the use or inability to use the
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
other commercial damages or losses), even if such Contributor
|
other commercial damages or losses), even if such Contributor
|
||||||
has been advised of the possibility of such damages.
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
or other liability obligations and/or rights consistent with this
|
or other liability obligations and/or rights consistent with this
|
||||||
License. However, in accepting such obligations, You may act only
|
License. However, in accepting such obligations, You may act only
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
defend, and hold each Contributor harmless for any liability
|
defend, and hold each Contributor harmless for any liability
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
of your accepting any such warranty or additional liability.
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
To apply the Apache License to your work, attach the following
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
replaced with your own identifying information. (Don't include
|
replaced with your own identifying information. (Don't include
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
comment syntax for the file format. We also recommend that a
|
comment syntax for the file format. We also recommend that a
|
||||||
file or class name and description of purpose be included on the
|
file or class name and description of purpose be included on the
|
||||||
same "printed page" as the copyright notice for easier
|
same "printed page" as the copyright notice for easier
|
||||||
identification within third-party archives.
|
identification within third-party archives.
|
||||||
|
|
||||||
Copyright [yyyy] [name of copyright owner]
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
|
|
|
||||||
526
node_modules/long/README.md
generated
vendored
526
node_modules/long/README.md
generated
vendored
|
|
@ -1,246 +1,280 @@
|
||||||
long.js
|
long.js
|
||||||
=======
|
=======
|
||||||
|
|
||||||
A Long class for representing a 64 bit two's-complement integer value derived from the [Closure Library](https://github.com/google/closure-library)
|
A Long class for representing a 64 bit two's-complement integer value derived from the [Closure Library](https://github.com/google/closure-library)
|
||||||
for stand-alone use and extended with unsigned support.
|
for stand-alone use and extended with unsigned support.
|
||||||
|
|
||||||
[](https://travis-ci.org/dcodeIO/long.js)
|
[](https://github.com/dcodeIO/long.js/actions?query=workflow%3ATest) [](https://github.com/dcodeIO/long.js/actions?query=workflow%3APublish) [](https://www.npmjs.com/package/long)
|
||||||
|
|
||||||
Background
|
Background
|
||||||
----------
|
----------
|
||||||
|
|
||||||
As of [ECMA-262 5th Edition](http://ecma262-5.com/ELS5_HTML.htm#Section_8.5), "all the positive and negative integers
|
As of [ECMA-262 5th Edition](http://ecma262-5.com/ELS5_HTML.htm#Section_8.5), "all the positive and negative integers
|
||||||
whose magnitude is no greater than 2<sup>53</sup> are representable in the Number type", which is "representing the
|
whose magnitude is no greater than 2<sup>53</sup> 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".
|
doubleprecision 64-bit format IEEE 754 values as specified in the IEEE Standard for Binary Floating-Point Arithmetic".
|
||||||
The [maximum safe integer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)
|
The [maximum safe integer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)
|
||||||
in JavaScript is 2<sup>53</sup>-1.
|
in JavaScript is 2<sup>53</sup>-1.
|
||||||
|
|
||||||
Example: 2<sup>64</sup>-1 is 1844674407370955**1615** but in JavaScript it evaluates to 1844674407370955**2000**.
|
Example: 2<sup>64</sup>-1 is 1844674407370955**1615** but in JavaScript it evaluates to 1844674407370955**2000**.
|
||||||
|
|
||||||
Furthermore, bitwise operators in JavaScript "deal only with integers in the range −2<sup>31</sup> through
|
Furthermore, bitwise operators in JavaScript "deal only with integers in the range −2<sup>31</sup> through
|
||||||
2<sup>31</sup>−1, inclusive, or in the range 0 through 2<sup>32</sup>−1, inclusive. These operators accept any value of
|
2<sup>31</sup>−1, inclusive, or in the range 0 through 2<sup>32</sup>−1, inclusive. These operators accept any value of
|
||||||
the Number type but first convert each such value to one of 2<sup>32</sup> integer values."
|
the Number type but first convert each such value to one of 2<sup>32</sup> integer values."
|
||||||
|
|
||||||
In some use cases, however, it is required to be able to reliably work with and perform bitwise operations on the full
|
In 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.
|
64 bits. This is where long.js comes into play.
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
-----
|
-----
|
||||||
|
|
||||||
The class is compatible with CommonJS and AMD loaders and is exposed globally as `Long` if neither is available.
|
The package exports an ECMAScript module with an UMD fallback.
|
||||||
|
|
||||||
```javascript
|
```
|
||||||
var Long = require("long");
|
$> npm install long
|
||||||
|
```
|
||||||
var longVal = new Long(0xFFFFFFFF, 0x7FFFFFFF);
|
|
||||||
|
```js
|
||||||
console.log(longVal.toString());
|
import Long from "long";
|
||||||
...
|
|
||||||
```
|
var value = new Long(0xFFFFFFFF, 0x7FFFFFFF);
|
||||||
|
console.log(value.toString());
|
||||||
API
|
...
|
||||||
---
|
```
|
||||||
|
|
||||||
### Constructor
|
Note that mixing ESM and CommonJS is not recommended as it yields different classes, albeit with the same functionality.
|
||||||
|
|
||||||
* new **Long**(low: `number`, high: `number`, unsigned?: `boolean`)<br />
|
### Usage with a CDN
|
||||||
Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers. See the from* functions below for more convenient ways of constructing Longs.
|
|
||||||
|
* From GitHub via [jsDelivr](https://www.jsdelivr.com):<br />
|
||||||
### Fields
|
`https://cdn.jsdelivr.net/gh/dcodeIO/long.js@TAG/index.js` (ESM)
|
||||||
|
* From npm via [jsDelivr](https://www.jsdelivr.com):<br />
|
||||||
* Long#**low**: `number`<br />
|
`https://cdn.jsdelivr.net/npm/long@VERSION/index.js` (ESM)<br />
|
||||||
The low 32 bits as a signed value.
|
`https://cdn.jsdelivr.net/npm/long@VERSION/umd/index.js` (UMD)
|
||||||
|
* From npm via [unpkg](https://unpkg.com):<br />
|
||||||
* Long#**high**: `number`<br />
|
`https://unpkg.com/long@VERSION/index.js` (ESM)<br />
|
||||||
The high 32 bits as a signed value.
|
`https://unpkg.com/long@VERSION/umd/index.js` (UMD)
|
||||||
|
|
||||||
* Long#**unsigned**: `boolean`<br />
|
Replace `TAG` respectively `VERSION` with a [specific version](https://github.com/dcodeIO/long.js/releases) or omit it (not recommended in production) to use main/latest.
|
||||||
Whether unsigned or not.
|
|
||||||
|
API
|
||||||
### Constants
|
---
|
||||||
|
|
||||||
* Long.**ZERO**: `Long`<br />
|
### Constructor
|
||||||
Signed zero.
|
|
||||||
|
* new **Long**(low: `number`, high?: `number`, unsigned?: `boolean`)<br />
|
||||||
* Long.**ONE**: `Long`<br />
|
Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers. See the from* functions below for more convenient ways of constructing Longs.
|
||||||
Signed one.
|
|
||||||
|
### Fields
|
||||||
* Long.**NEG_ONE**: `Long`<br />
|
|
||||||
Signed negative one.
|
* Long#**low**: `number`<br />
|
||||||
|
The low 32 bits as a signed value.
|
||||||
* Long.**UZERO**: `Long`<br />
|
|
||||||
Unsigned zero.
|
* Long#**high**: `number`<br />
|
||||||
|
The high 32 bits as a signed value.
|
||||||
* Long.**UONE**: `Long`<br />
|
|
||||||
Unsigned one.
|
* Long#**unsigned**: `boolean`<br />
|
||||||
|
Whether unsigned or not.
|
||||||
* Long.**MAX_VALUE**: `Long`<br />
|
|
||||||
Maximum signed value.
|
### Constants
|
||||||
|
|
||||||
* Long.**MIN_VALUE**: `Long`<br />
|
* Long.**ZERO**: `Long`<br />
|
||||||
Minimum signed value.
|
Signed zero.
|
||||||
|
|
||||||
* Long.**MAX_UNSIGNED_VALUE**: `Long`<br />
|
* Long.**ONE**: `Long`<br />
|
||||||
Maximum unsigned value.
|
Signed one.
|
||||||
|
|
||||||
### Utility
|
* Long.**NEG_ONE**: `Long`<br />
|
||||||
|
Signed negative one.
|
||||||
* Long.**isLong**(obj: `*`): `boolean`<br />
|
|
||||||
Tests if the specified object is a Long.
|
* Long.**UZERO**: `Long`<br />
|
||||||
|
Unsigned zero.
|
||||||
* Long.**fromBits**(lowBits: `number`, highBits: `number`, unsigned?: `boolean`): `Long`<br />
|
|
||||||
Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is assumed to use 32 bits.
|
* Long.**UONE**: `Long`<br />
|
||||||
|
Unsigned one.
|
||||||
* Long.**fromBytes**(bytes: `number[]`, unsigned?: `boolean`, le?: `boolean`): `Long`<br />
|
|
||||||
Creates a Long from its byte representation.
|
* Long.**MAX_VALUE**: `Long`<br />
|
||||||
|
Maximum signed value.
|
||||||
* Long.**fromBytesLE**(bytes: `number[]`, unsigned?: `boolean`): `Long`<br />
|
|
||||||
Creates a Long from its little endian byte representation.
|
* Long.**MIN_VALUE**: `Long`<br />
|
||||||
|
Minimum signed value.
|
||||||
* Long.**fromBytesBE**(bytes: `number[]`, unsigned?: `boolean`): `Long`<br />
|
|
||||||
Creates a Long from its big endian byte representation.
|
* Long.**MAX_UNSIGNED_VALUE**: `Long`<br />
|
||||||
|
Maximum unsigned value.
|
||||||
* Long.**fromInt**(value: `number`, unsigned?: `boolean`): `Long`<br />
|
|
||||||
Returns a Long representing the given 32 bit integer value.
|
### Utility
|
||||||
|
|
||||||
* Long.**fromNumber**(value: `number`, unsigned?: `boolean`): `Long`<br />
|
* Long.**isLong**(obj: `*`): `boolean`<br />
|
||||||
Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.
|
Tests if the specified object is a Long.
|
||||||
|
|
||||||
* Long.**fromString**(str: `string`, unsigned?: `boolean`, radix?: `number`)<br />
|
* Long.**fromBits**(lowBits: `number`, highBits: `number`, unsigned?: `boolean`): `Long`<br />
|
||||||
Long.**fromString**(str: `string`, radix: `number`)<br />
|
Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is assumed to use 32 bits.
|
||||||
Returns a Long representation of the given string, written using the specified radix.
|
|
||||||
|
* Long.**fromBytes**(bytes: `number[]`, unsigned?: `boolean`, le?: `boolean`): `Long`<br />
|
||||||
* Long.**fromValue**(val: `*`, unsigned?: `boolean`): `Long`<br />
|
Creates a Long from its byte representation.
|
||||||
Converts the specified value to a Long using the appropriate from* function for its type.
|
|
||||||
|
* Long.**fromBytesLE**(bytes: `number[]`, unsigned?: `boolean`): `Long`<br />
|
||||||
### Methods
|
Creates a Long from its little endian byte representation.
|
||||||
|
|
||||||
* Long#**add**(addend: `Long | number | string`): `Long`<br />
|
* Long.**fromBytesBE**(bytes: `number[]`, unsigned?: `boolean`): `Long`<br />
|
||||||
Returns the sum of this and the specified Long.
|
Creates a Long from its big endian byte representation.
|
||||||
|
|
||||||
* Long#**and**(other: `Long | number | string`): `Long`<br />
|
* Long.**fromInt**(value: `number`, unsigned?: `boolean`): `Long`<br />
|
||||||
Returns the bitwise AND of this Long and the specified.
|
Returns a Long representing the given 32 bit integer value.
|
||||||
|
|
||||||
* Long#**compare**/**comp**(other: `Long | number | string`): `number`<br />
|
* Long.**fromNumber**(value: `number`, unsigned?: `boolean`): `Long`<br />
|
||||||
Compares this Long's value with the specified's. Returns `0` if they are the same, `1` if the this is greater and `-1` if the given one is greater.
|
Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.
|
||||||
|
|
||||||
* Long#**divide**/**div**(divisor: `Long | number | string`): `Long`<br />
|
* Long.**fromString**(str: `string`, unsigned?: `boolean`, radix?: `number`)<br />
|
||||||
Returns this Long divided by the specified.
|
Long.**fromString**(str: `string`, radix: `number`)<br />
|
||||||
|
Returns a Long representation of the given string, written using the specified radix.
|
||||||
* Long#**equals**/**eq**(other: `Long | number | string`): `boolean`<br />
|
|
||||||
Tests if this Long's value equals the specified's.
|
* Long.**fromValue**(val: `*`, unsigned?: `boolean`): `Long`<br />
|
||||||
|
Converts the specified value to a Long using the appropriate from* function for its type.
|
||||||
* Long#**getHighBits**(): `number`<br />
|
|
||||||
Gets the high 32 bits as a signed integer.
|
### Methods
|
||||||
|
|
||||||
* Long#**getHighBitsUnsigned**(): `number`<br />
|
* Long#**add**(addend: `Long | number | string`): `Long`<br />
|
||||||
Gets the high 32 bits as an unsigned integer.
|
Returns the sum of this and the specified Long.
|
||||||
|
|
||||||
* Long#**getLowBits**(): `number`<br />
|
* Long#**and**(other: `Long | number | string`): `Long`<br />
|
||||||
Gets the low 32 bits as a signed integer.
|
Returns the bitwise AND of this Long and the specified.
|
||||||
|
|
||||||
* Long#**getLowBitsUnsigned**(): `number`<br />
|
* Long#**compare**/**comp**(other: `Long | number | string`): `number`<br />
|
||||||
Gets the low 32 bits as an unsigned integer.
|
Compares this Long's value with the specified's. Returns `0` if they are the same, `1` if the this is greater and `-1` if the given one is greater.
|
||||||
|
|
||||||
* Long#**getNumBitsAbs**(): `number`<br />
|
* Long#**divide**/**div**(divisor: `Long | number | string`): `Long`<br />
|
||||||
Gets the number of bits needed to represent the absolute value of this Long.
|
Returns this Long divided by the specified.
|
||||||
|
|
||||||
* Long#**greaterThan**/**gt**(other: `Long | number | string`): `boolean`<br />
|
* Long#**equals**/**eq**(other: `Long | number | string`): `boolean`<br />
|
||||||
Tests if this Long's value is greater than the specified's.
|
Tests if this Long's value equals the specified's.
|
||||||
|
|
||||||
* Long#**greaterThanOrEqual**/**gte**/**ge**(other: `Long | number | string`): `boolean`<br />
|
* Long#**getHighBits**(): `number`<br />
|
||||||
Tests if this Long's value is greater than or equal the specified's.
|
Gets the high 32 bits as a signed integer.
|
||||||
|
|
||||||
* Long#**isEven**(): `boolean`<br />
|
* Long#**getHighBitsUnsigned**(): `number`<br />
|
||||||
Tests if this Long's value is even.
|
Gets the high 32 bits as an unsigned integer.
|
||||||
|
|
||||||
* Long#**isNegative**(): `boolean`<br />
|
* Long#**getLowBits**(): `number`<br />
|
||||||
Tests if this Long's value is negative.
|
Gets the low 32 bits as a signed integer.
|
||||||
|
|
||||||
* Long#**isOdd**(): `boolean`<br />
|
* Long#**getLowBitsUnsigned**(): `number`<br />
|
||||||
Tests if this Long's value is odd.
|
Gets the low 32 bits as an unsigned integer.
|
||||||
|
|
||||||
* Long#**isPositive**(): `boolean`<br />
|
* Long#**getNumBitsAbs**(): `number`<br />
|
||||||
Tests if this Long's value is positive.
|
Gets the number of bits needed to represent the absolute value of this Long.
|
||||||
|
|
||||||
* Long#**isZero**/**eqz**(): `boolean`<br />
|
* Long#**greaterThan**/**gt**(other: `Long | number | string`): `boolean`<br />
|
||||||
Tests if this Long's value equals zero.
|
Tests if this Long's value is greater than the specified's.
|
||||||
|
|
||||||
* Long#**lessThan**/**lt**(other: `Long | number | string`): `boolean`<br />
|
* Long#**greaterThanOrEqual**/**gte**/**ge**(other: `Long | number | string`): `boolean`<br />
|
||||||
Tests if this Long's value is less than the specified's.
|
Tests if this Long's value is greater than or equal the specified's.
|
||||||
|
|
||||||
* Long#**lessThanOrEqual**/**lte**/**le**(other: `Long | number | string`): `boolean`<br />
|
* Long#**isEven**(): `boolean`<br />
|
||||||
Tests if this Long's value is less than or equal the specified's.
|
Tests if this Long's value is even.
|
||||||
|
|
||||||
* Long#**modulo**/**mod**/**rem**(divisor: `Long | number | string`): `Long`<br />
|
* Long#**isNegative**(): `boolean`<br />
|
||||||
Returns this Long modulo the specified.
|
Tests if this Long's value is negative.
|
||||||
|
|
||||||
* Long#**multiply**/**mul**(multiplier: `Long | number | string`): `Long`<br />
|
* Long#**isOdd**(): `boolean`<br />
|
||||||
Returns the product of this and the specified Long.
|
Tests if this Long's value is odd.
|
||||||
|
|
||||||
* Long#**negate**/**neg**(): `Long`<br />
|
* Long#**isPositive**(): `boolean`<br />
|
||||||
Negates this Long's value.
|
Tests if this Long's value is positive or zero.
|
||||||
|
|
||||||
* Long#**not**(): `Long`<br />
|
* Long#**isZero**/**eqz**(): `boolean`<br />
|
||||||
Returns the bitwise NOT of this Long.
|
Tests if this Long's value equals zero.
|
||||||
|
|
||||||
* Long#**notEquals**/**neq**/**ne**(other: `Long | number | string`): `boolean`<br />
|
* Long#**lessThan**/**lt**(other: `Long | number | string`): `boolean`<br />
|
||||||
Tests if this Long's value differs from the specified's.
|
Tests if this Long's value is less than the specified's.
|
||||||
|
|
||||||
* Long#**or**(other: `Long | number | string`): `Long`<br />
|
* Long#**lessThanOrEqual**/**lte**/**le**(other: `Long | number | string`): `boolean`<br />
|
||||||
Returns the bitwise OR of this Long and the specified.
|
Tests if this Long's value is less than or equal the specified's.
|
||||||
|
|
||||||
* Long#**shiftLeft**/**shl**(numBits: `Long | number | string`): `Long`<br />
|
* Long#**modulo**/**mod**/**rem**(divisor: `Long | number | string`): `Long`<br />
|
||||||
Returns this Long with bits shifted to the left by the given amount.
|
Returns this Long modulo the specified.
|
||||||
|
|
||||||
* Long#**shiftRight**/**shr**(numBits: `Long | number | string`): `Long`<br />
|
* Long#**multiply**/**mul**(multiplier: `Long | number | string`): `Long`<br />
|
||||||
Returns this Long with bits arithmetically shifted to the right by the given amount.
|
Returns the product of this and the specified Long.
|
||||||
|
|
||||||
* Long#**shiftRightUnsigned**/**shru**/**shr_u**(numBits: `Long | number | string`): `Long`<br />
|
* Long#**negate**/**neg**(): `Long`<br />
|
||||||
Returns this Long with bits logically shifted to the right by the given amount.
|
Negates this Long's value.
|
||||||
|
|
||||||
* Long#**subtract**/**sub**(subtrahend: `Long | number | string`): `Long`<br />
|
* Long#**not**(): `Long`<br />
|
||||||
Returns the difference of this and the specified Long.
|
Returns the bitwise NOT of this Long.
|
||||||
|
|
||||||
* Long#**toBytes**(le?: `boolean`): `number[]`<br />
|
* Long#**countLeadingZeros**/**clz**(): `number`<br />
|
||||||
Converts this Long to its byte representation.
|
Returns count leading zeros of this Long.
|
||||||
|
|
||||||
* Long#**toBytesLE**(): `number[]`<br />
|
* Long#**countTrailingZeros**/**ctz**(): `number`<br />
|
||||||
Converts this Long to its little endian byte representation.
|
Returns count trailing zeros of this Long.
|
||||||
|
|
||||||
* Long#**toBytesBE**(): `number[]`<br />
|
* Long#**notEquals**/**neq**/**ne**(other: `Long | number | string`): `boolean`<br />
|
||||||
Converts this Long to its big endian byte representation.
|
Tests if this Long's value differs from the specified's.
|
||||||
|
|
||||||
* Long#**toInt**(): `number`<br />
|
* Long#**or**(other: `Long | number | string`): `Long`<br />
|
||||||
Converts the Long to a 32 bit integer, assuming it is a 32 bit integer.
|
Returns the bitwise OR of this Long and the specified.
|
||||||
|
|
||||||
* Long#**toNumber**(): `number`<br />
|
* Long#**shiftLeft**/**shl**(numBits: `Long | number | string`): `Long`<br />
|
||||||
Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).
|
Returns this Long with bits shifted to the left by the given amount.
|
||||||
|
|
||||||
* Long#**toSigned**(): `Long`<br />
|
* Long#**shiftRight**/**shr**(numBits: `Long | number | string`): `Long`<br />
|
||||||
Converts this Long to signed.
|
Returns this Long with bits arithmetically shifted to the right by the given amount.
|
||||||
|
|
||||||
* Long#**toString**(radix?: `number`): `string`<br />
|
* Long#**shiftRightUnsigned**/**shru**/**shr_u**(numBits: `Long | number | string`): `Long`<br />
|
||||||
Converts the Long to a string written in the specified radix.
|
Returns this Long with bits logically shifted to the right by the given amount.
|
||||||
|
|
||||||
* Long#**toUnsigned**(): `Long`<br />
|
* Long#**rotateLeft**/**rotl**(numBits: `Long | number | string`): `Long`<br />
|
||||||
Converts this Long to unsigned.
|
Returns this Long with bits rotated to the left by the given amount.
|
||||||
|
|
||||||
* Long#**xor**(other: `Long | number | string`): `Long`<br />
|
* Long#**rotateRight**/**rotr**(numBits: `Long | number | string`): `Long`<br />
|
||||||
Returns the bitwise XOR of this Long and the given one.
|
Returns this Long with bits rotated to the right by the given amount.
|
||||||
|
|
||||||
Building
|
* Long#**subtract**/**sub**(subtrahend: `Long | number | string`): `Long`<br />
|
||||||
--------
|
Returns the difference of this and the specified Long.
|
||||||
|
|
||||||
To build an UMD bundle to `dist/long.js`, run:
|
* Long#**toBytes**(le?: `boolean`): `number[]`<br />
|
||||||
|
Converts this Long to its byte representation.
|
||||||
```
|
|
||||||
$> npm install
|
* Long#**toBytesLE**(): `number[]`<br />
|
||||||
$> npm run build
|
Converts this Long to its little endian byte representation.
|
||||||
```
|
|
||||||
|
* Long#**toBytesBE**(): `number[]`<br />
|
||||||
Running the [tests](./tests):
|
Converts this Long to its big endian byte representation.
|
||||||
|
|
||||||
```
|
* Long#**toInt**(): `number`<br />
|
||||||
$> npm test
|
Converts the Long to a 32 bit integer, assuming it is a 32 bit integer.
|
||||||
```
|
|
||||||
|
* Long#**toNumber**(): `number`<br />
|
||||||
|
Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).
|
||||||
|
|
||||||
|
* Long#**toSigned**(): `Long`<br />
|
||||||
|
Converts this Long to signed.
|
||||||
|
|
||||||
|
* Long#**toString**(radix?: `number`): `string`<br />
|
||||||
|
Converts the Long to a string written in the specified radix.
|
||||||
|
|
||||||
|
* Long#**toUnsigned**(): `Long`<br />
|
||||||
|
Converts this Long to unsigned.
|
||||||
|
|
||||||
|
* Long#**xor**(other: `Long | number | string`): `Long`<br />
|
||||||
|
Returns the bitwise XOR of this Long and the given one.
|
||||||
|
|
||||||
|
WebAssembly support
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
[WebAssembly](http://webassembly.org) supports 64-bit integer arithmetic out of the box, hence a [tiny WebAssembly module](./wasm.wat) is used to compute operations like multiplication, division and remainder more efficiently (slow operations like division are around twice as fast), falling back to floating point based computations in JavaScript where WebAssembly is not yet supported, e.g., in older versions of node.
|
||||||
|
|
||||||
|
Building
|
||||||
|
--------
|
||||||
|
|
||||||
|
Building the UMD fallback:
|
||||||
|
|
||||||
|
```
|
||||||
|
$> npm run build
|
||||||
|
```
|
||||||
|
|
||||||
|
Running the [tests](./tests):
|
||||||
|
|
||||||
|
```
|
||||||
|
$> npm test
|
||||||
|
```
|
||||||
|
|
|
||||||
2
node_modules/long/dist/long.js
generated
vendored
2
node_modules/long/dist/long.js
generated
vendored
File diff suppressed because one or more lines are too long
1
node_modules/long/dist/long.js.map
generated
vendored
1
node_modules/long/dist/long.js.map
generated
vendored
File diff suppressed because one or more lines are too long
446
node_modules/long/index.d.ts
generated
vendored
Normal file
446
node_modules/long/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,446 @@
|
||||||
|
declare class Long {
|
||||||
|
/**
|
||||||
|
* Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as signed integers. See the from* functions below for more convenient ways of constructing Longs.
|
||||||
|
*/
|
||||||
|
constructor(low: number, high?: number, unsigned?: boolean);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Maximum unsigned value.
|
||||||
|
*/
|
||||||
|
static MAX_UNSIGNED_VALUE: Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Maximum signed value.
|
||||||
|
*/
|
||||||
|
static MAX_VALUE: Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Minimum signed value.
|
||||||
|
*/
|
||||||
|
static MIN_VALUE: Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Signed negative one.
|
||||||
|
*/
|
||||||
|
static NEG_ONE: Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Signed one.
|
||||||
|
*/
|
||||||
|
static ONE: Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unsigned one.
|
||||||
|
*/
|
||||||
|
static UONE: Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unsigned zero.
|
||||||
|
*/
|
||||||
|
static UZERO: Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Signed zero
|
||||||
|
*/
|
||||||
|
static ZERO: Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The high 32 bits as a signed value.
|
||||||
|
*/
|
||||||
|
high: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The low 32 bits as a signed value.
|
||||||
|
*/
|
||||||
|
low: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether unsigned or not.
|
||||||
|
*/
|
||||||
|
unsigned: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is assumed to use 32 bits.
|
||||||
|
*/
|
||||||
|
static fromBits(lowBits: number, highBits: number, unsigned?: boolean): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a Long representing the given 32 bit integer value.
|
||||||
|
*/
|
||||||
|
static fromInt(value: number, unsigned?: boolean): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.
|
||||||
|
*/
|
||||||
|
static fromNumber(value: number, unsigned?: boolean): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a Long representation of the given string, written using the specified radix.
|
||||||
|
*/
|
||||||
|
static fromString(str: string, unsigned?: boolean | number, radix?: number): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a Long from its byte representation.
|
||||||
|
*/
|
||||||
|
static fromBytes(bytes: number[], unsigned?: boolean, le?: boolean): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a Long from its little endian byte representation.
|
||||||
|
*/
|
||||||
|
static fromBytesLE(bytes: number[], unsigned?: boolean): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a Long from its big endian byte representation.
|
||||||
|
*/
|
||||||
|
static fromBytesBE(bytes: number[], unsigned?: boolean): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests if the specified object is a Long.
|
||||||
|
*/
|
||||||
|
static isLong(obj: any): obj is Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts the specified value to a Long.
|
||||||
|
*/
|
||||||
|
static fromValue(val: Long | number | string | { low: number, high: number, unsigned: boolean }, unsigned?: boolean): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the sum of this and the specified Long.
|
||||||
|
*/
|
||||||
|
add(addend: number | Long | string): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the bitwise AND of this Long and the specified.
|
||||||
|
*/
|
||||||
|
and(other: Long | number | string): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compares this Long's value with the specified's.
|
||||||
|
*/
|
||||||
|
compare(other: Long | number | string): number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compares this Long's value with the specified's.
|
||||||
|
*/
|
||||||
|
comp(other: Long | number | string): number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns this Long divided by the specified.
|
||||||
|
*/
|
||||||
|
divide(divisor: Long | number | string): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns this Long divided by the specified.
|
||||||
|
*/
|
||||||
|
div(divisor: Long | number | string): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests if this Long's value equals the specified's.
|
||||||
|
*/
|
||||||
|
equals(other: Long | number | string): boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests if this Long's value equals the specified's.
|
||||||
|
*/
|
||||||
|
eq(other: Long | number | string): boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the high 32 bits as a signed integer.
|
||||||
|
*/
|
||||||
|
getHighBits(): number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the high 32 bits as an unsigned integer.
|
||||||
|
*/
|
||||||
|
getHighBitsUnsigned(): number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the low 32 bits as a signed integer.
|
||||||
|
*/
|
||||||
|
getLowBits(): number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the low 32 bits as an unsigned integer.
|
||||||
|
*/
|
||||||
|
getLowBitsUnsigned(): number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the number of bits needed to represent the absolute value of this Long.
|
||||||
|
*/
|
||||||
|
getNumBitsAbs(): number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests if this Long's value is greater than the specified's.
|
||||||
|
*/
|
||||||
|
greaterThan(other: Long | number | string): boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests if this Long's value is greater than the specified's.
|
||||||
|
*/
|
||||||
|
gt(other: Long | number | string): boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests if this Long's value is greater than or equal the specified's.
|
||||||
|
*/
|
||||||
|
greaterThanOrEqual(other: Long | number | string): boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests if this Long's value is greater than or equal the specified's.
|
||||||
|
*/
|
||||||
|
gte(other: Long | number | string): boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests if this Long's value is greater than or equal the specified's.
|
||||||
|
*/
|
||||||
|
ge(other: Long | number | string): boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests if this Long's value is even.
|
||||||
|
*/
|
||||||
|
isEven(): boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests if this Long's value is negative.
|
||||||
|
*/
|
||||||
|
isNegative(): boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests if this Long's value is odd.
|
||||||
|
*/
|
||||||
|
isOdd(): boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests if this Long's value is positive or zero.
|
||||||
|
*/
|
||||||
|
isPositive(): boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests if this Long's value equals zero.
|
||||||
|
*/
|
||||||
|
isZero(): boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests if this Long's value equals zero.
|
||||||
|
*/
|
||||||
|
eqz(): boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests if this Long's value is less than the specified's.
|
||||||
|
*/
|
||||||
|
lessThan(other: Long | number | string): boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests if this Long's value is less than the specified's.
|
||||||
|
*/
|
||||||
|
lt(other: Long | number | string): boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests if this Long's value is less than or equal the specified's.
|
||||||
|
*/
|
||||||
|
lessThanOrEqual(other: Long | number | string): boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests if this Long's value is less than or equal the specified's.
|
||||||
|
*/
|
||||||
|
lte(other: Long | number | string): boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests if this Long's value is less than or equal the specified's.
|
||||||
|
*/
|
||||||
|
le(other: Long | number | string): boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns this Long modulo the specified.
|
||||||
|
*/
|
||||||
|
modulo(other: Long | number | string): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns this Long modulo the specified.
|
||||||
|
*/
|
||||||
|
mod(other: Long | number | string): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns this Long modulo the specified.
|
||||||
|
*/
|
||||||
|
rem(other: Long | number | string): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the product of this and the specified Long.
|
||||||
|
*/
|
||||||
|
multiply(multiplier: Long | number | string): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the product of this and the specified Long.
|
||||||
|
*/
|
||||||
|
mul(multiplier: Long | number | string): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Negates this Long's value.
|
||||||
|
*/
|
||||||
|
negate(): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Negates this Long's value.
|
||||||
|
*/
|
||||||
|
neg(): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the bitwise NOT of this Long.
|
||||||
|
*/
|
||||||
|
not(): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns count leading zeros of this Long.
|
||||||
|
*/
|
||||||
|
countLeadingZeros(): number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns count leading zeros of this Long.
|
||||||
|
*/
|
||||||
|
clz(): number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns count trailing zeros of this Long.
|
||||||
|
*/
|
||||||
|
countTrailingZeros(): number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns count trailing zeros of this Long.
|
||||||
|
*/
|
||||||
|
ctz(): number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests if this Long's value differs from the specified's.
|
||||||
|
*/
|
||||||
|
notEquals(other: Long | number | string): boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests if this Long's value differs from the specified's.
|
||||||
|
*/
|
||||||
|
neq(other: Long | number | string): boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests if this Long's value differs from the specified's.
|
||||||
|
*/
|
||||||
|
ne(other: Long | number | string): boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the bitwise OR of this Long and the specified.
|
||||||
|
*/
|
||||||
|
or(other: Long | number | string): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns this Long with bits shifted to the left by the given amount.
|
||||||
|
*/
|
||||||
|
shiftLeft(numBits: number | Long): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns this Long with bits shifted to the left by the given amount.
|
||||||
|
*/
|
||||||
|
shl(numBits: number | Long): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns this Long with bits arithmetically shifted to the right by the given amount.
|
||||||
|
*/
|
||||||
|
shiftRight(numBits: number | Long): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns this Long with bits arithmetically shifted to the right by the given amount.
|
||||||
|
*/
|
||||||
|
shr(numBits: number | Long): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns this Long with bits logically shifted to the right by the given amount.
|
||||||
|
*/
|
||||||
|
shiftRightUnsigned(numBits: number | Long): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns this Long with bits logically shifted to the right by the given amount.
|
||||||
|
*/
|
||||||
|
shru(numBits: number | Long): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns this Long with bits logically shifted to the right by the given amount.
|
||||||
|
*/
|
||||||
|
shr_u(numBits: number | Long): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns this Long with bits rotated to the left by the given amount.
|
||||||
|
*/
|
||||||
|
rotateLeft(numBits: number | Long): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns this Long with bits rotated to the left by the given amount.
|
||||||
|
*/
|
||||||
|
rotl(numBits: number | Long): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns this Long with bits rotated to the right by the given amount.
|
||||||
|
*/
|
||||||
|
rotateRight(numBits: number | Long): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns this Long with bits rotated to the right by the given amount.
|
||||||
|
*/
|
||||||
|
rotr(numBits: number | Long): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the difference of this and the specified Long.
|
||||||
|
*/
|
||||||
|
subtract(subtrahend: number | Long | string): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the difference of this and the specified Long.
|
||||||
|
*/
|
||||||
|
sub(subtrahend: number | Long | string): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts the Long to a 32 bit integer, assuming it is a 32 bit integer.
|
||||||
|
*/
|
||||||
|
toInt(): number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).
|
||||||
|
*/
|
||||||
|
toNumber(): number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts this Long to its byte representation.
|
||||||
|
*/
|
||||||
|
|
||||||
|
toBytes(le?: boolean): number[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts this Long to its little endian byte representation.
|
||||||
|
*/
|
||||||
|
|
||||||
|
toBytesLE(): number[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts this Long to its big endian byte representation.
|
||||||
|
*/
|
||||||
|
|
||||||
|
toBytesBE(): number[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts this Long to signed.
|
||||||
|
*/
|
||||||
|
toSigned(): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts the Long to a string written in the specified radix.
|
||||||
|
*/
|
||||||
|
toString(radix?: number): string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts this Long to unsigned.
|
||||||
|
*/
|
||||||
|
toUnsigned(): Long;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the bitwise XOR of this Long and the given one.
|
||||||
|
*/
|
||||||
|
xor(other: Long | number | string): Long;
|
||||||
|
}
|
||||||
|
|
||||||
|
export = Long; // compatible with `import Long from "long"`
|
||||||
1468
node_modules/long/index.js
generated
vendored
1468
node_modules/long/index.js
generated
vendored
File diff suppressed because it is too large
Load diff
36
node_modules/long/package.json
generated
vendored
36
node_modules/long/package.json
generated
vendored
|
|
@ -1,9 +1,8 @@
|
||||||
{
|
{
|
||||||
"name": "long",
|
"name": "long",
|
||||||
"version": "4.0.0",
|
"version": "5.2.0",
|
||||||
"author": "Daniel Wirtz <dcode@dcode.io>",
|
"author": "Daniel Wirtz <dcode@dcode.io>",
|
||||||
"description": "A Long class for representing a 64-bit two's-complement integer value.",
|
"description": "A Long class for representing a 64-bit two's-complement integer value.",
|
||||||
"main": "src/long.js",
|
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/dcodeIO/long.js.git"
|
"url": "https://github.com/dcodeIO/long.js.git"
|
||||||
|
|
@ -12,23 +11,34 @@
|
||||||
"url": "https://github.com/dcodeIO/long.js/issues"
|
"url": "https://github.com/dcodeIO/long.js/issues"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"math"
|
"math",
|
||||||
|
"long",
|
||||||
|
"int64"
|
||||||
],
|
],
|
||||||
"dependencies": {},
|
|
||||||
"devDependencies": {
|
|
||||||
"webpack": "^3.10.0"
|
|
||||||
},
|
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
"type": "module",
|
||||||
|
"main": "umd/index.js",
|
||||||
|
"types": "index.d.ts",
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"import": "./index.js",
|
||||||
|
"require": "./umd/index.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "webpack",
|
"build": "esm2umd Long index.js > umd/index.js",
|
||||||
"test": "node tests"
|
"test": "node tests"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"index.js",
|
"index.js",
|
||||||
|
"index.d.ts",
|
||||||
|
"umd/index.js",
|
||||||
|
"umd/index.d.ts",
|
||||||
|
"umd/package.json",
|
||||||
"LICENSE",
|
"LICENSE",
|
||||||
"README.md",
|
"README.md"
|
||||||
"src/long.js",
|
],
|
||||||
"dist/long.js",
|
"devDependencies": {
|
||||||
"dist/long.js.map"
|
"esm2umd": "^0.2.0"
|
||||||
]
|
}
|
||||||
}
|
}
|
||||||
1323
node_modules/long/src/long.js
generated
vendored
1323
node_modules/long/src/long.js
generated
vendored
File diff suppressed because it is too large
Load diff
2
node_modules/long/umd/index.d.ts
generated
vendored
Normal file
2
node_modules/long/umd/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
import Long from "../index.js";
|
||||||
|
export = Long;
|
||||||
1432
node_modules/long/umd/index.js
generated
vendored
Normal file
1432
node_modules/long/umd/index.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
3
node_modules/long/umd/package.json
generated
vendored
Normal file
3
node_modules/long/umd/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"type": "commonjs"
|
||||||
|
}
|
||||||
12
package-lock.json
generated
12
package-lock.json
generated
|
|
@ -29,7 +29,7 @@
|
||||||
"glob": "^7.1.7",
|
"glob": "^7.1.7",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"jsonschema": "1.2.6",
|
"jsonschema": "1.2.6",
|
||||||
"long": "^4.0.0",
|
"long": "^5.2.0",
|
||||||
"md5": "^2.3.0",
|
"md5": "^2.3.0",
|
||||||
"path": "^0.12.7",
|
"path": "^0.12.7",
|
||||||
"query-string": "^7.0.1",
|
"query-string": "^7.0.1",
|
||||||
|
|
@ -4155,8 +4155,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/long": {
|
"node_modules/long": {
|
||||||
"version": "4.0.0",
|
"version": "5.2.0",
|
||||||
"integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
|
"resolved": "https://registry.npmjs.org/long/-/long-5.2.0.tgz",
|
||||||
|
"integrity": "sha512-9RTUNjK60eJbx3uz+TEGF7fUr29ZDxR5QzXcyDpeSfeH28S9ycINflOgOlppit5U+4kNTe83KQnMEerw7GmE8w=="
|
||||||
},
|
},
|
||||||
"node_modules/lowercase-keys": {
|
"node_modules/lowercase-keys": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
|
|
@ -9668,8 +9669,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"long": {
|
"long": {
|
||||||
"version": "4.0.0",
|
"version": "5.2.0",
|
||||||
"integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
|
"resolved": "https://registry.npmjs.org/long/-/long-5.2.0.tgz",
|
||||||
|
"integrity": "sha512-9RTUNjK60eJbx3uz+TEGF7fUr29ZDxR5QzXcyDpeSfeH28S9ycINflOgOlppit5U+4kNTe83KQnMEerw7GmE8w=="
|
||||||
},
|
},
|
||||||
"lowercase-keys": {
|
"lowercase-keys": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
"glob": "^7.1.7",
|
"glob": "^7.1.7",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"jsonschema": "1.2.6",
|
"jsonschema": "1.2.6",
|
||||||
"long": "^4.0.0",
|
"long": "^5.2.0",
|
||||||
"md5": "^2.3.0",
|
"md5": "^2.3.0",
|
||||||
"path": "^0.12.7",
|
"path": "^0.12.7",
|
||||||
"query-string": "^7.0.1",
|
"query-string": "^7.0.1",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue