mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Use native BigInt
# Conflicts: # helpers/scanner/parsers/plist.js
This commit is contained in:
parent
1330a1d6ae
commit
df266d7760
1 changed files with 1 additions and 2 deletions
|
|
@ -5,7 +5,6 @@ import { Buffer } from 'buffer/'
|
||||||
|
|
||||||
|
|
||||||
// const fs = require('fs');
|
// const fs = require('fs');
|
||||||
// const bigInt = require('big-integer')
|
|
||||||
// const bufferApi = require('buffer')
|
// const bufferApi = require('buffer')
|
||||||
const debug = false
|
const debug = false
|
||||||
|
|
||||||
|
|
@ -188,7 +187,7 @@ function parseBuffer ( buffer ) {
|
||||||
const data = buffer.slice(offset + 1, offset + 1 + length);
|
const data = buffer.slice(offset + 1, offset + 1 + length);
|
||||||
if (length === 16) {
|
if (length === 16) {
|
||||||
const str = bufferToHexString(data);
|
const str = bufferToHexString(data);
|
||||||
return bigInt(str, 16);
|
return BigInt(str, 16);
|
||||||
}
|
}
|
||||||
return data.reduce((acc, curr) => {
|
return data.reduce((acc, curr) => {
|
||||||
acc <<= 8;
|
acc <<= 8;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue