UNPKG

@netlify/redirect-parser

Version:

Parses netlify redirects into a js object representation

6 lines (5 loc) 197 B
// Check if a field is valid redirect URL export const isUrl = function (pathOrUrl) { return SCHEMES.some((scheme) => pathOrUrl.startsWith(scheme)); }; const SCHEMES = ['http://', 'https://'];