Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

storeIP.js 818B

123456789101112
  1. var assert = require('assert');
  2. var rangeCheck = require('../range_check.js');
  3. assert.equal(rangeCheck.storeIP('foo'), null);
  4. assert.equal(rangeCheck.storeIP('::ffff:127.0.0.1'), '127.0.0.1');
  5. assert.equal(rangeCheck.storeIP('2001:0000:0111:0000:0011:0000:0001:0000'), '2001:0:111:0:11:0:1:0');
  6. assert.equal(rangeCheck.storeIP('2001:0001:0000:0001:0000:0000:0000:0000'), '2001:1:0:1::');
  7. assert.equal(rangeCheck.storeIP('0000:0000:0000:0000:0000:0000:0000:0000'), '::');
  8. assert.equal(rangeCheck.storeIP('0000:0000:0000:0000:0000:0000:0000:0001'), '::1');
  9. assert.equal(rangeCheck.storeIP('2041:0000:140F:0000:0000:0000:875B:131B'), '2041:0:140F::875B:131B');
  10. assert.equal(rangeCheck.storeIP('2001:0001:0002:0003:0004:0005:0006:0007'), '2001:1:2:3:4:5:6:7');
  11. assert.equal(rangeCheck.storeIP('127.0.0.1'), '127.0.0.1');