UNPKG

@hom3chuk/tektek

Version:

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

19 lines (18 loc) 503 B
import { rootHeaderContains } from "../../common/index.js"; var detectNextJS = function (har, asap) { if (asap === void 0) { asap = true; } var res = { detected: false, name: 'Next.js', reasons: [], }; if (rootHeaderContains(har, 'x-powered-by', 'next.js')) { res.detected = true; res.reasons.push('x-powered-by header mentions next.js'); if (asap) { return res; } } return res; }; export default detectNextJS;