Package Exports
- ip2buf
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ip2buf) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ip2buf
Convert ip address to buffer
Usage
const ip2buf = require('ip2buf')
ip2buf('8.8.8.8') // [0x8, 0x8, 0x8, 0x8]
ip2buf('2001::') // [0x20, 0x01, 0, ...]API
[default] function(ip: string): Buffer
convert ipv4 or ipv6 to buffer
v4(ip: string): Buffer
convert ipv4 to buffer
v6(ip: string): Buffer
convert ipv6 to buffer
Related
- date2buffer - convert Date to Buffer
License
MIT, 2016 (c) Dmitry Tsvettsikh