From 954583f3d56fbfb60321725f13ad092e536e3737 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 7 Nov 2018 22:10:16 +0100 Subject: Removed node_modules --- node_modules/locutus/php/network/inet_ntop.js | 34 --------------------------- 1 file changed, 34 deletions(-) delete mode 100644 node_modules/locutus/php/network/inet_ntop.js (limited to 'node_modules/locutus/php/network/inet_ntop.js') diff --git a/node_modules/locutus/php/network/inet_ntop.js b/node_modules/locutus/php/network/inet_ntop.js deleted file mode 100644 index 1ebf8e3..0000000 --- a/node_modules/locutus/php/network/inet_ntop.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -module.exports = function inet_ntop(a) { - // eslint-disable-line camelcase - // discuss at: http://locutus.io/php/inet_ntop/ - // original by: Theriault (https://github.com/Theriault) - // example 1: inet_ntop('\x7F\x00\x00\x01') - // returns 1: '127.0.0.1' - // _example 2: inet_ntop('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1') - // _returns 2: '::1' - - var i = 0; - var m = ''; - var c = []; - - a += ''; - if (a.length === 4) { - // IPv4 - return [a.charCodeAt(0), a.charCodeAt(1), a.charCodeAt(2), a.charCodeAt(3)].join('.'); - } else if (a.length === 16) { - // IPv6 - for (i = 0; i < 16; i++) { - c.push(((a.charCodeAt(i++) << 8) + a.charCodeAt(i)).toString(16)); - } - return c.join(':').replace(/((^|:)0(?=:|$))+:?/g, function (t) { - m = t.length > m.length ? t : m; - return t; - }).replace(m || ' ', '::'); - } else { - // Invalid length - return false; - } -}; -//# sourceMappingURL=inet_ntop.js.map \ No newline at end of file -- cgit v1.2.3