From ef5d4157fb8d67a8a92c8b0f9a14d7c47ce7a25f Mon Sep 17 00:00:00 2001 From: Yuval Adam Date: Fri, 11 Dec 2015 22:51:17 +0200 Subject: Split range into first/last --- index.js | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'index.js') diff --git a/index.js b/index.js index 293a0c0..2b4cbe1 100644 --- a/index.js +++ b/index.js @@ -44,9 +44,14 @@ class IPAddress extends React.Component { return block.mask } - getRange = () => { + getFirst = () => { var block = new Netmask(this.getPretty()) - return block.first + ' - ' + block.last + return block.first + } + + getLast = () => { + var block = new Netmask(this.getPretty()) + return block.last } getCount = () => { @@ -85,13 +90,17 @@ class IPAddress extends React.Component { {this.getNetmask()} Netmask - - {this.getRange()} - Range + + {this.getFirst()} + First IP + + + {this.getLast()} + Last IP {this.getCount().toLocaleString()} - Addresses + Count -- cgit v1.3.1