MCPcopy
hub / github.com/browserslist/browserslist / checkExtend

Function checkExtend

node.js:23–40  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

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

Callers 1

node.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…