Socket
Socket
Sign inDemoInstall

@taktikorg/labore-fugiat-neque

Package Overview
Dependencies
Maintainers
0
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@taktikorg/labore-fugiat-neque

[![CircleCI](https://dl.circleci.com/status-badge/img/circleci/9fJmTZfn8d8p7GtVt688PY/JjriGjhcxBD6zYKygMZaet/tree/master.svg?style=svg&circle-token=7baede7efd3db5f1f25fb439e97d5f695ff76318)](https://dl.circleci.com/status-badge/redirect/circleci/9fJmTZfn8


Version published
Weekly downloads
407
increased by7.67%
Maintainers
0
Weekly downloads
 
Created
Source

CircleCI codecov downloads npm snyk

@taktikorg/labore-fugiat-neque

@taktikorg/labore-fugiat-neque is a library for validating and manipulating IPv4 and IPv6 addresses in JavaScript.

Migrating from 6.x to 7.x

@taktikorg/labore-fugiat-neque was rewritten in TypeScript for version 7. If you were using version 6 you'll need to make these changes to upgrade:

  • Instead of checking isValid(), which has been removed, you'll need to use a try/catch if you're accepting unknown input. This made the TypeScript types substantially easier as well as allowed the use of an AddressError class which will contain a parseMessage if an error occurred in the parsing step.
  • Instead of using the error, parseError, and valid attributes you'll need to use the message and parseMessage of the thrown AddressError.

Documentation

Documentation is available at @taktikorg/labore-fugiat-neque.js.org.

Examples

var Address6 = require('@taktikorg/labore-fugiat-neque').Address6;

var address = new Address6('2001:0:ce49:7601:e866:efff:62c3:fffe');

var teredo = address.inspectTeredo();

teredo.client4;    // '157.60.0.1'

Features

  • Usable via CommonJS or ESM
  • Parsing of all IPv6 notations
  • Parsing of IPv6 addresses and ports from URLs with Address6.fromURL(url)
  • Validity checking
  • Decoding of the Teredo information in an address
  • Whether one address is a valid subnet of another
  • What special properties a given address has (multicast prefix, unique local address prefix, etc.)
  • Number of subnets of a certain size in a given address
  • Display methods
    • Hex, binary, and decimal
    • Canonical form
    • Correct form
    • IPv4-compatible (i.e. ::ffff:192.168.0.1)
  • Works in node and the browser (with browserify)
  • ~1,600 test cases

Used by

Keywords

FAQs

Package last updated on 12 Sep 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc