MCPcopy
hub / github.com/sequelize/sequelize / CIDR

Class CIDR

src/data-types.js:907–914  ·  view source on GitHub ↗

* The cidr type holds an IPv4 or IPv6 network specification. Takes 7 or 19 bytes. * * Only available for Postgres

Source from the content-addressed store, hash-verified

905 * Only available for Postgres
906 */
907class CIDR extends ABSTRACT {
908 validate(value) {
909 if (typeof value !== 'string' || !Validator.isIPRange(value)) {
910 throw new sequelizeErrors.ValidationError(util.format('%j is not a valid CIDR', value));
911 }
912 return true;
913 }
914}
915
916/**
917 * The INET type holds an IPv4 or IPv6 host address, and optionally its subnet. Takes 7 or 19 bytes

Callers 1

data-types.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected