whitequark / ipaddr.js

IP address manipulation library in JavaScript
MIT License
576 stars 92 forks source link

Add isValidCIDR method #176

Closed jeremy-code closed 7 months ago

jeremy-code commented 7 months ago

This adds a helper method "isValidCIDR" to both v4 and v6, which returns true if can be parsed by parseCIDR, and false if an exception is thrown.

whitequark commented 7 months ago

Thanks!