MCPcopy
hub / github.com/tomdionysus/foaas / loadRenderers

Method loadRenderers

lib/foaas.js:129–139  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

127 }
128
129 loadRenderers (path) {
130 return (() => {
131 const result = []
132 for (const file of Array.from(fs.readdirSync(path))) {
133 const renderer = require(path + '/' + file)
134 this.formatsArray.push(renderer.mime)
135 result.push(this.formats[renderer.mime] = renderer.render)
136 }
137 return result
138 })()
139 }
140
141 loadFilters (path) {
142 for (const file of Array.from(fs.readdirSync(path))) {

Callers 1

constructorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected