net-validations

1.0.8 • Public • Published

net-validations

Utility to validate network-related input fields

Installation

npm install net-validations

Example

This utility contains a series of functions raising errors in case their input is not valid.

validateAS("onions");
// will throw Error("The Autonomous System number format is not valid. It must be an integer.")

validateASpath([2914, 3333, 1234]);

validateVRP({prefix: "192.0.2.0/24", maxLength: 28, asn: 65536});

Available functions

  • validatePrefix
  • validateIP
  • validateAS
  • validateASpath
  • validateVRP

Package Sidebar

Install

npm i net-validations

Weekly Downloads

16

Version

1.0.8

License

BSD-3-Clause

Unpacked Size

6 kB

Total Files

5

Last publish

Collaborators

  • maxcam