UNPKG

@swaggerexpert/cookie

Version:

RFC 6265 compliant cookie parser, validator and serializer.

9 lines 301 B
import testCookieValue from "../../../cookie/test/cookie-value.mjs"; const cookieValueLenientValidator = cookieValue => { if (!testCookieValue(cookieValue, { strict: false })) { throw new TypeError(`Invalid cookie value: ${cookieValue}`); } }; export default cookieValueLenientValidator;