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.

inRange.js 689B

123456789101112131415161718
  1. var assert = require('assert');
  2. var rangeCheck = require('../range_check.js');
  3. assert.equal(rangeCheck.inRange('10.0.1.5', '10.0.0.0/8'), true);
  4. assert.equal(rangeCheck.inRange('192.0.1.5', '10.0.0.0/8'), false);
  5. assert.equal(rangeCheck.inRange('2001:db8:1234::1', '2001:db8::/32'), true);
  6. assert.equal(rangeCheck.inRange('192.168.1.1', ['10.0.0.0/8', '192.0.0.0/8']), true);
  7. assert.equal(rangeCheck.inRange('foo', ['10.0.0.0/8', '192.0.0.0/8']), false);
  8. assert.equal(rangeCheck.inRange('0::', '0000::/128'), true);
  9. assert.equal(rangeCheck.inRange('0::', '0000::'), true);
  10. assert.equal(rangeCheck.inRange('0::', '0::'), true);
  11. assert.equal(rangeCheck.inRange('lol', 'lol'), false);