import { Either } from "fp-ts/lib/Either" ; import { array , Errors } from "io-ts" ; import { CIDR } from "italia-ts-commons/lib/strings" ; /**
 * Parse a comma separated string of CIDR(s) or IP(s) into an array
 */ export function decodeCIDRs ( cidrs ? ) { return array ( CIDR ) . decode ( cidrs ?. split ( "," ) . map ( c => c . trim ( ) ) . map ( c => ( c . indexOf ( "/" ) !== - 1 ? c : c + "/32" ) ) ) ; }