1.1.7 • Published 4 months ago
react-bytes v1.1.7
react-bytes
Exchange int and short with bytes array
Installation
$ npm instal react-bytes
API
bytes2Short(arr, start)
transform bytes array to short
bytes2Short([1, 2], 0).should.equal(258);
bytes2Int(arr, start)
transform bytes array to int
bytes2Int([1, 2, 3, 4], 0).should.equal(16909060);
bytes2Long(arr, start)
transform bytes array to long
bytes2Long([1, 2, 3, 4, 5, 6, 7, 8], 0).should.equal(72623859790382856n);
bytes2Float(arr, start)
transform bytes array to float
bytes2Float([1, 2, 3, 4], 0).should.equal(2.387939260590663e-38);
short2Bytes(i)
transform short to bytes
int2Bytes(258).should.equal([1, 2]);
int2Bytes(i)
transform int to bytes
int2Bytes(16909060).should.equal([1, 2, 3, 4]);
long2Bytes(i)
transform long to bytes
long2Bytes(72623859790382856n).should.equal([1, 2, 3, 4, 5, 6, 7, 8]);
float2Bytes(i)
transform float to bytes
float2Bytes(2.387939260590663e-38).should.equal([1, 2, 3, 4]);
1.1.7
4 months ago
1.1.6
4 months ago
1.1.1
2 years ago
1.2.0
2 years ago
1.2.6
2 years ago
1.2.5
2 years ago
1.1.5
2 years ago
1.2.4
2 years ago
1.1.4
2 years ago
1.2.3
2 years ago
1.1.3
2 years ago
1.2.2
2 years ago
1.1.2
2 years ago
1.2.1
2 years ago
1.1.0
3 years ago
1.0.9
5 years ago
1.0.8
5 years ago
1.0.7
5 years ago
1.0.6
5 years ago
1.0.5
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago