MCPcopy Create free account
hub / github.com/browserslist/browserslist / nodeQuery

Function nodeQuery

index.js:588–602  ·  view source on GitHub ↗
(context, node)

Source from the content-addressed store, hash-verified

586}
587
588function nodeQuery(context, node) {
589 var matched = browserslist.nodeVersions.filter(function (i) {
590 return isVersionsMatch(i, node.version)
591 })
592 if (matched.length === 0) {
593 if (context.ignoreUnknownVersions) {
594 return []
595 } else {
596 throw new BrowserslistError(
597 'Unknown version ' + node.version + ' of Node.js'
598 )
599 }
600 }
601 return ['node ' + matched[matched.length - 1]]
602}
603
604function sinceQuery(context, node) {
605 var year = parseInt(node.year)

Callers

nothing calls this directly

Calls 1

isVersionsMatchFunction · 0.85

Tested by

no test coverage detected