
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Use this when you need to get/slice some bits at an arbitrary bit index from a byte or Uint8Array. This is something like a bit-array, bit vector, bit string, bit set, or whatever they are called. Should work equally well in browser or in node. These are only getters.
If you're using Node.js type:
npm install --save get-bits
or
yarn add get-bits
const { getBytes } = require('get-bits')
or
import { getUint32 } from 'get-bits'
const data = new Uint8Array([
72, 87, 162, 219, 72, 0, 1, 233, 250, 17, 8, 242, 212, 110, 88, 191, 252, 101, 222, 0, 6])
getUint32(data, 0, 6) // 18
getUint32(data, 8, 30) // 367572690
subByte(num, start, length)Bits from a number. Assuming you're working with an 8 bit number.
subByteLE(num, start, length)Bits from a number Little Endian. Assuming you're working with an 8 bit number.
getUint32(Uint8Array, start, length)getDataView(Uint8Array, start, length)getBytes(Uint8Array, start, length)get6Array()Handy for Base64 encoding/decoding.
getIntOrBytes(Uint8Array, start, length, [get6=false])getUint32LE()FAQs
Get a slice of bits.
We found that get-bits demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.