Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
compact-encoding-net
Advanced tools
Readme
compact-encoding codecs for net types.
npm install compact-encoding-net
port
Codec for 16 bit port numbers.
const { port } = require('compact-encoding-net')
const buffer = cenc.encode(port, 8080)
cenc.decode(port, buffer)
// 8080
ipv4
Codec for IPv4 addresses.
:warning: The codec is only defined for valid IPv4 addresses.
const { ipv4 } = require('compact-encoding-net')
const buffer = cenc.encode(ipv4, '127.0.0.1')
cenc.decode(ipv4, buffer)
// '127.0.0.1'
ipv4Address
Codec for IPv4 addresses plus a port.
const { ipv4Address } = require('compact-encoding-net')
const buffer = cenc.encode(ipv4, { host: '127.0.0.1', port: 8080 })
cenc.decode(ipv4Address, buffer)
// { host: '127.0.0.1', port: 8080 }
ipv6
Codec for IPv6 addresses.
:warning: The codec is only defined for valid IPv6 addresses.
const { ipv6 } = require('compact-encoding-net')
const buffer = cenc.encode(ipv6, '::1')
cenc.decode(ipv6, buffer)
// '0:0:0:0:0:0:0:1'
ipv6Address
Codec for IPv6 addresses plus a port.
const { ipv6Address } = require('compact-encoding-net')
const buffer = cenc.encode(ipv6Address, { host: '::1', port: 8080 })
cenc.decode(ipv6Address, buffer)
// { host: '0:0:0:0:0:0:0:1', port: 8080 }
ip
Codec for dual IPv4/6 addresses.
:warning: The codec is only defined for valid IPv4 and IPv6 addresses.
const { ip } = require('compact-encoding-net')
const buffer = cenc.encode(ip, '::1')
cenc.decode(ip, buffer)
// '0:0:0:0:0:0:0:1'
ipAddress
Codec for dual IPv4/6 addresses plus a port.
const { ipAddress } = require('compact-encoding-net')
const buffer = cenc.encode(ipAddress, { host: '::1', port: 8080 })
cenc.decode(ipv6Address, buffer)
// { host: '0:0:0:0:0:0:0:1', family: 6, port: 8080 }
ISC
FAQs
Compact codecs for net types
The npm package compact-encoding-net receives a total of 1,732 weekly downloads. As such, compact-encoding-net popularity was classified as popular.
We found that compact-encoding-net demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.