import * as path from "path" ; import * as url from "url" ; /**
 * A regular expression that can be used to test for the header comment in a compiled CSS file.
 */ export const REGEXP_COMMENT_HEADER = /^\/\*#css-blocks (?!end)([A-Za-z0-9-_]+)\*\/\r?\n/m ; /**
 * A regular expression that can be used to test for the definition URL in a compiled CSS file.
 */ export const REGEXP_COMMENT_DEFINITION_REF = /^\/\*#blockDefinitionURL=([\S]+?)\*\/\r?\n/m ; /**
 * A regular expression that can be used to test for the footer comment in a compiled CSS file.
 */ export const REGEXP_COMMENT_FOOTER = /^\/\*#css-blocks end\*\/\r?\n?/m ; param urlOrPath returns export function isDefinitionUrlValid ( urlOrPath ) { if ( path . isAbsolute ( urlOrPath ) ) { return false ; } const parsedUrl = url . parse ( urlOrPath ) ; if ( parsedUrl . protocol ) { return parsedUrl . protocol === "data:" ; } else { return true ; } }