(folderPath, filepathPredicate = filepath => filepath !== ".DS_Store")
| 17859 | return methods[format](content) |
| 17860 | } |
| 17861 | static fromFolder(folderPath, filepathPredicate = filepath => filepath !== ".DS_Store") { |
| 17862 | const path = require("path") |
| 17863 | const fs = require("fs") |
| 17864 | const particle = new Particle() |
| 17865 | const files = fs |
| 17866 | .readdirSync(folderPath) |
| 17867 | .map(filename => path.join(folderPath, filename)) |
| 17868 | .filter(filepath => !fs.statSync(filepath).isDirectory() && filepathPredicate(filepath)) |
| 17869 | .forEach(filePath => particle.appendLineAndSubparticles(filePath, fs.readFileSync(filePath, "utf8"))) |
| 17870 | return particle |
| 17871 | } |
| 17872 | } |
| 17873 | Particle._parserPoolsCache = new Map() |
| 17874 | Particle.ParserPool = ParserPool |
nothing calls this directly
no test coverage detected