New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ip-to-base

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ip-to-base

Convert IP address to its binary/decimal/hexadecimal/octal representation and vise versa

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

ip-to-base - Convert IP address to its binary/decimal/hexadecimal/octal representation and vise versa

Installation

# npm ..
$ npm install ip-to-base 
# yarn ..
$ yarn add ip-to-base

Usage

This is a practical example of how to use.

import { IpToBase, BaseToIp } from 'ip-to-base'

// convert ip address to binary
const result = new IpToBase('127.0.0.1', 2).convert()

console.log(result)
// 01111111000000000000000000000001

// convert binary to ip address
const result = new IpToBase('01111111000000000000000000000001', 2).convert()

console.log(result)
// 127.0.0.1

Online converters

  • IP to Binary converter
  • IP to Decimal converter
  • IP to Hexadecimal converter
  • IP to Octal converter
  • Binary to IP converter
  • Decimal to IP converter
  • Hexadecimal to IP converter
  • Octal to IP converter

Keywords

ip-to-binary

FAQs

Package last updated on 23 Jan 2023

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