ContainsNodeModules checks if a path contains the node_modules directory.
(s string)
| 252 | |
| 253 | // ContainsNodeModules checks if a path contains the node_modules directory. |
| 254 | func ContainsNodeModules(s string) bool { |
| 255 | return strings.Contains(s, "/node_modules/") |
| 256 | } |
| 257 | |
| 258 | // GetEachFileNameOfModule returns all possible file paths for a module, including symlink alternatives. |
| 259 | // This function handles symlink resolution and provides multiple path options for module resolution. |