From 8c7d6cddf299a07cfa012c79320eec3ac1e4d46c Mon Sep 17 00:00:00 2001 From: soruh <33131839+soruh@users.noreply.github.com> Date: Sat, 27 Oct 2018 21:26:03 +0200 Subject: [PATCH] Update ip-tests.ts --- types/ip/ip-tests.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/ip/ip-tests.ts b/types/ip/ip-tests.ts index 13abf1f4a6..f1fbf4726d 100644 --- a/types/ip/ip-tests.ts +++ b/types/ip/ip-tests.ts @@ -20,3 +20,7 @@ ip.toString(buff); ip.subnet('192.168.1.134', '255.255.255.192'); ip.cidrSubnet('192.168.1.134/26'); ip.cidrSubnet('192.168.1.134/26').contains('192.168.1.134'); +var buf = new Buffer(128); +var offset = 64; +ip.toBuffer('127.0.0.1', buf, offset); +ip.toString(buf, offset, 4);