1.0.4 • Published 1 year ago
nv-random-bufvw v1.0.4
nv-random-bufvw
- generate a random ArrayBufferView
install
- npm install nv-random-bufvw
splitted
usage
example
> x()
Uint16Array(125) [
12621, 59726, 58608, 34877, 6530, 53097, 48499, 52092,
24320, 56650, 16127, 64578, 814, 48013, 19875, 29037,
40247, 63879, 62302, 49164, 11051, 34979, 60401, 34710,
27177, 11802, 36739, 41370, 56668, 62755, 22237, 30290,
49630, 22081, 35597, 64374, 55031, 6792, 12087, 27341,
49496, 61775, 7523, 20602, 9677, 57701, 45222, 40866,
63113, 42802, 18964, 36443, 52269, 29935, 47911, 61083,
27971, 52407, 31763, 24034, 10557, 16170, 15672, 16432,
20941, 38944, 38564, 11482, 59933, 47756, 31204, 63457,
2515, 55029, 35670, 26632, 896, 30962, 4532, 6623,
39105, 59815, 36954, 5845, 1932, 32241, 36201, 52627,
18229, 25859, 12221, 27064, 39876, 7835, 46019, 60614,
602, 48358, 31835, 32864,
... 25 more items
]
> x()
ArrayBuffer {
[Uint8Contents]: <7a b0 34 78 77 53 5a 36 a8 eb 60 69 2a 5a bb fb 01 ff 04 63 d8 50 11 57 db 84 f9 c7 44 da 35 34 6f 32 d1 c4 5a 4e 09 0a a3 d3 bf a0 1b b8 0a c4 83 9d 7d 20 e5 cc 19 5c e8 1f 13 e9 65 8f 66 41 9d bf 34 72 64 17 23 2d 88 78 95 84 30 fd 71 95 d1 5c f8 da>,
byteLength: 84
}
> x()
ArrayBuffer {
[Uint8Contents]: <f6 70 16 f4 18 35 7d dd 98 6c 6b 69 49 56 e3 8e 85 98 fe 9e 15 1b 63 fb 18 03 b0 3f e2 b6>,
byteLength: 30
}
> x()
Float64Array(103) [
224337634205.15527, 1577202797312, 4322419894991.8496, 2597658934042.1895,
2686481041301.2695, 533990515700.88086, 3470331106728.4053, 1968007619384.5215,
934793734365.543, 622494156542.8408, 4169205745635.288, 3844056042155.449,
852466657154.4814, 168316320913.64844, 28233551792.489258, 18515250138.487305,
965135156439.5713, 3628319854691.66, 1312045218312.166, 947878445575.0127,
3130997500526.006, 2861712358412.629, 4195060491287.1367, 3979478935803.048,
2167070748018.2969, 249410402350.2578, 4326885710823.7715, 546336887955.2959,
1421391803732.1133, 2500554844131.1143, 3298599377294.9814, 3723385653689.5107,
2388242767309.2607, 2917919609608.757, 1697433911474.7832, 920831652966.4717,
654440630808.4443, 254701267694.27832, 2835056717320.1133, 735641339962.2461,
3935736387096.2236, 3083612186079.092, 4105637315716.133, 2462201583281.088,
4344057752454.8467, 2648099474766.5215, 364127690316.9785, 4318100693590.885,
701722146186.6416, 2247394757251.376, 678841052251.0957, 3531580065309.8057,
3178151712619.5723, 9398628117.625, 2268039603120.8135, 4324343413228.9385,
2365194907934.5312, 1030886271360.4551, 1469700833545.1436, 2794599635261.3604,
1311202204583.3936, 3016759053071.282, 391413999645.43164, 3774792537929.1562,
4333794068885.8047, 1150287554678.7393, 3988570420448.165, 1194909989528.6533,
1080974154338.3926, 573278179783.5605, 2819039288605.912, 3638924850368.0586,
4089245912579.788, 203009142845.84766, 3420634814052.4355, 3662574833620.134,
1635641878776.4932, 2174601897089.8223, 3673013330790.76, 4105949556024.033,
1654676708126.1387, 1760583698088.332, 4272865408228.1113, 1431286737948.0283,
1204033122146.8223, 1830371458688.3125, 404321065144.78125, 4257941837520.3467,
3962302904208.2334, 3766423015989.6885, 410894029729.3496, 2622016365133.4688,
1628657585611.961, 3148217026716.0254, 4754198098.702148, 2643014022795.0283,
3733983462990.5586, 604174490924.3877, 147016620004.89258, 119151356505.83301,
... 3 more items
]
> x()
Uint16Array(15) [
10323, 9616, 11711,
45523, 34997, 4003,
62076, 38872, 31265,
50906, 51429, 43740,
3658, 56929, 54770
]
> x()
Uint8Array(18) [
248, 213, 0, 127, 135, 30,
6, 240, 219, 73, 228, 59,
36, 133, 135, 255, 161, 184
]
> x()
Uint16Array(27) [
43115, 16991, 21053, 26989,
51735, 6415, 35747, 48076,
24966, 280, 1113, 35567,
33869, 8497, 2936, 35209,
61405, 154, 21417, 22801,
42849, 62029, 16604, 41244,
8308, 23042, 9970
]
> x()
DataView {
byteLength: 1,
byteOffset: 0,
buffer: ArrayBuffer { [Uint8Contents]: <2f>, byteLength: 1 }
}
> x()
Int32Array(46) [
-781558647, 1085922418, 884619441, 996511618,
-690331044, -61884027, 1370833805, 1427563447,
-1023869140, -1785508690, -1982675260, 1095822700,
103353625, 1183504276, -529291195, 407000969,
1284035011, -2134670008, -1216085100, 2076154294,
476069491, 1202343102, 1536245122, 1573011824,
561933783, -1049070768, -1377180813, -381840275,
-121645250, -1741115099, -776182077, -2066044431,
-1275677087, 302229843, -1901210015, 547854628,
-746749734, 1589167501, 261991524, 1980715196,
-625152855, 1881608996, 1763573274, -1559396718,
1919321093, -482151752
]
> x()
DataView {
byteLength: 96,
byteOffset: 0,
buffer: ArrayBuffer {
[Uint8Contents]: <24 90 4e 0d 66 97 b9 a2 36 2b 36 ac 4c 5c 45 f1 ba ac 97 7c a5 c9 2f ae e8 9a f6 cb e7 43 a8 e9 c4 00 ef 8c 05 8b e4 e2 6c af 7d 64 c7 e0 b0 65 4e ea 44 44 a3 03 ba 83 6e 51 0c f5 1a c6 41 44 e7 a1 85 76 53 a8 9e 6f d0 c5 93 5c 8a 98 79 fe 90 7f f8 7a bc 12 0d de 82 4c 8f 2c 92 a3 b2 e4>,
byteLength: 96
}
}
> x()
BigInt64Array(27) [
-7120796919332529530n, 5231393127304680265n,
-6690270902716135134n, 9119689759818370588n,
235010598125134057n, -2944214828440986689n,
-2787551219985529008n, 219329854047841617n,
-5871354892528520604n, -2973153659130880897n,
5851786210640064421n, 8667650751943159983n,
-1415809014018282868n, 2731366807376689683n,
2661159034040530977n, 5608320013751702659n,
-4848097535048363223n, -9188666372998700444n,
-9127136866180955559n, -84862639541834536n,
-6896803103024352502n, -7566870129763291154n,
-1375078305620942982n, 5240856076021606504n,
1622940646134484175n, -80490722249475255n,
4052051185011032051n
]
> x()
Uint32Array(68) [
1716595099, 239847718, 2862753739, 3774179925,
1726313941, 1164311185, 3266044886, 194617373,
566004, 2282295589, 4099113000, 111693897,
3435476152, 2322941612, 2753590557, 3833239662,
3823017228, 3437860525, 1594235256, 178240474,
3495932579, 783088138, 1657971129, 1994213244,
2486660095, 3133236582, 2409086565, 2700094301,
4021186568, 1153686338, 2492925644, 2674556790,
3800853021, 1446227540, 2535576268, 4028933712,
3343293561, 3951367807, 2712575137, 1821683844,
4132709081, 4144449759, 1790225591, 3643704352,
1959382633, 727512495, 902743919, 3036986314,
1540290431, 2925320181, 2701823561, 1884227491,
1119073868, 1025510130, 3057983286, 1869488358,
1867003471, 302698203, 3301244664, 3794505917,
1752186650, 3704143766, 1892400049, 200994335,
3343891901, 226558329, 1129609768, 2436409818
]
> x()
DataView {
byteLength: 26,
byteOffset: 0,
buffer: ArrayBuffer {
[Uint8Contents]: <d6 41 a2 d5 94 d3 a5 92 05 cf 2c b7 a6 8f f1 08 ab 7a c6 90 d3 6a fe b9 9c 8b>,
byteLength: 26
}
}
> x.MAX_CNT
128
> x.MAX_CNT =8
8
> x()
Uint8Array(1) [ 120 ]
> x()
Uint8Array(4) [ 205, 187, 138, 170 ]
> x()
Int32Array(4) [ 171116585, -406143699, -968071166, 1399305589 ]
> x()
Uint16Array(2) [ 3199, 51566 ]
> x()
Uint32Array(0) []
> x()
Uint8Array(1) [ 115 ]
> x()
Float32Array(2) [ 3812785664, 3306547456 ]
> x()
Uint32Array(7) [
3601961090,
2275724246,
2822072874,
2642888278,
1606966704,
2858519346,
1890503077
]
> x()
Uint8Array(4) [ 51, 173, 5, 145 ]
> x()
Uint8ClampedArray(1) [ 219 ]
> x()
ArrayBuffer { [Uint8Contents]: <16 c6 96 7d 4d>, byteLength: 5 }
> x()
Float32Array(2) [ 896350656, 363813600 ]
> x()
Int8Array(0) []
> x()
Uint16Array(4) [ 16741, 13867, 12753, 44830 ]
> x()
Int16Array(0) []
> x()
Int32Array(4) [ -1425732695, 469579795, -350412286, -1227641451 ]
> x()
BigUint64Array(2) [ 1632594045354387609n, 17539755658691721735n ]
> x()
Int32Array(0) []
> x()
ArrayBuffer { [Uint8Contents]: <13 4f 90 21 b1>, byteLength: 5 }
> x()
BigInt64Array(5) [
-263598749324425830n,
723429373442224453n,
-8247504964095852622n,
-5338967081538904821n,
-3184096941510683n
]
> x()
ArrayBuffer { [Uint8Contents]: <77>, byteLength: 1 }
> x()
Float64Array(7) [
2944433154427.1875,
3811733994093.2305,
3985543825929.825,
215424283971.7295,
3412061679463.583,
2931376719241.618,
2520509838447.7285
]
>
>
METHODS
APIS
LICENSE
- ISC
1.0.4
1 year ago