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.

isIP.js 653B

123456789101112131415161718192021
  1. var assert = require('assert');
  2. var rangeCheck = require('../range_check.js');
  3. assert.equal(rangeCheck.isIP('10.0.1.5'), true);
  4. assert.equal(rangeCheck.isIP('123:123'), false);
  5. assert.equal(rangeCheck.isIP('123::123'), true);
  6. assert.equal(rangeCheck.isIP('foo'), false);
  7. assert.equal(rangeCheck.isIP('192.168.1.1.'), false);
  8. ////////////////////////////////
  9. assert.equal(rangeCheck.isV4('10.0.1.5'), true);
  10. assert.equal(rangeCheck.isV4('foo'), false);
  11. assert.equal(rangeCheck.isV4('123::123'), false);
  12. assert.equal(rangeCheck.isV6('123::123'), true);
  13. assert.equal(rangeCheck.isV6('foo'), false);
  14. assert.equal(rangeCheck.isV6('10.0.1.5'), false);