* Mask %%value%% with a bitmask of %%bits%% ones.
(_value, _bits)
| 63 | * Mask %%value%% with a bitmask of %%bits%% ones. |
| 64 | */ |
| 65 | function mask(_value, _bits) { |
| 66 | const value = getUint(_value, "value"); |
| 67 | const bits = BigInt(getNumber(_bits, "bits")); |
| 68 | return value & ((BN_1 << bits) - BN_1); |
| 69 | } |
| 70 | exports.mask = mask; |
| 71 | /** |
| 72 | * Gets a BigInt from %%value%%. If it is an invalid value for |