UNPKG

@hom3chuk/tektek

Version:

A library for detecting technologies used within HTTP Archive (HAR)

26 lines (25 loc) 761 B
import { anyCssResourceContentContains, rootBodyContains } from "../../common/index.js"; var detectTailwindCss = function (har, asap) { if (asap === void 0) { asap = true; } var res = { detected: false, name: 'Tailwind CSS', reasons: [], }; if (rootBodyContains(har, '--tw-')) { res.detected = true; res.reasons.push('tailwind class prefix present in document body'); if (asap) { return res; } } if (anyCssResourceContentContains(har, 'tailwindcss v')) { res.detected = true; res.reasons.push('tailwind license present in a css resource'); if (asap) { return res; } } return res; }; export default detectTailwindCss;