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

Function checkExtend

node.js:24–41  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

22var parseConfigCache = {}
23
24function checkExtend(name) {
25 var use = ' Use `dangerousExtend` option to disable.'
26 if (!CONFIG_PATTERN.test(name) && !SCOPED_CONFIG__PATTERN.test(name)) {
27 throw new BrowserslistError(
28 'Browserslist config needs `browserslist-config-` prefix. ' + use
29 )
30 }
31 if (name.replace(/^@[^/]+\//, '').indexOf('.') !== -1) {
32 throw new BrowserslistError(
33 '`.` not allowed in Browserslist config name. ' + use
34 )
35 }
36 if (name.indexOf('node_modules') !== -1) {
37 throw new BrowserslistError(
38 '`node_modules` not allowed in Browserslist config.' + use
39 )
40 }
41}
42
43function getPathType(filepath) {
44 var stats

Callers 1

node.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected