diff options
Diffstat (limited to 'node_modules/is-cidr/example/example.js')
-rw-r--r-- | node_modules/is-cidr/example/example.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/node_modules/is-cidr/example/example.js b/node_modules/is-cidr/example/example.js new file mode 100644 index 000000000..2ac23af4e --- /dev/null +++ b/node_modules/is-cidr/example/example.js @@ -0,0 +1,14 @@ +var r = require('../lib') + +var v4true = r.isCidrV4('1.1.1.1/24') +console.log('cidrv4 true is', v4true) + +var v4false = r.isCidrV4('1.1.1.256/24') +console.log('cidrv4 false is', v4false) + +var v6true = r.isCidrV6('fe80:0000:0000:0000:0204:61ff:fe9d:f156') +console.log('cidrv6 true is', v6true) + +var v6false = r.isCidrV6('fe80:0000:0000:0000:0204:61ff:fe9d:f156/sdfsdfs') +console.log('cidrv6 false is', v6false) + |