MCPcopy Create free account
hub / github.com/glslify/glslify / isRequirePath

Function isRequirePath

transform.js:250–257  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

248}
249
250function isRequirePath (node) {
251 return node.type === 'Identifier' && node.name === 'require'
252 && node.parent.type === 'CallExpression'
253 && node.parent.arguments[0]
254 && node.parent.arguments[0].type === 'Literal'
255 && node.parent.arguments[0].value === 'path'
256 && node.parent.parent.type === 'VariableDeclarator'
257}
258
259function isRequireGlslify (node, dir) {
260 return node.type === 'Identifier' && node.name === 'require'

Callers 1

onnodeFunction · 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…