MCPcopy Create free account
hub / github.com/violentmonkey/violentmonkey / bufferContents

Function bufferContents

scripts/i18n.js:174–181  ·  view source on GitHub ↗
(file, enc, cb)

Source from the content-addressed store, hash-verified

172 }
173
174 function bufferContents(file, enc, cb) {
175 if (file.isNull()) return cb();
176 if (file.isStream()) return this.emit('error', new PluginError('VM-i18n', 'Stream is not supported.'));
177 const extname = path.extname(file.path);
178 const type = typePatternMap[extname];
179 if (type) extractFile(file.contents, type);
180 cb();
181 }
182
183 function endStream(cb) {
184 locales.load()

Callers

nothing calls this directly

Calls 3

extractFileFunction · 0.85
emitMethod · 0.80
cbFunction · 0.50

Tested by

no test coverage detected