Last active
August 29, 2015 14:00
-
-
Save jbenet/3c0392fb8621c6bda181 to your computer and use it in GitHub Desktop.
ip string to buffer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var transformer = require('dat-transformer'); | |
var str2buf = transformer('ip-address', 'ip-address-buffer'); | |
console.log(str2buf('127.0.0.1')); | |
// <Buffer 7f 00 00 01> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment