Module: js-whatever/js/ip-pad

js-whatever/js/ip-pad

require("js-whatever/js/ip-pad")(ip) → {string}

Pads the components of an IPv4 address with leading zeros to allow them to be lexicographically sorted

Parameters:
Name Type Description
ip string

The IP address

Source:
Returns:

The IP address with leading zeros

Type
string
Example
ipPad('93.184.216.119'); // returns 093.184.216.119
ipPad('10.7.14.241'); // returns 010.007.014.241
Source:
Copyright 2013-2018 Micro Focus International plc. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
Documentation generated by JSDoc 3.4.3 on Thu Jun 21st 18:04 2018 using the DocStrap template.