MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / write

Function write

tools/mage/translations.js:131–142  ·  view source on GitHub ↗
(filename, content)

Source from the content-addressed store, hash-verified

129 * @returns {Promise<undefined>} - A promise that resolves when the file has been written.
130 */
131const write = (filename, content) =>
132 new Promise((resolve, reject) => {
133 if (verbose) {
134 console.log('writing', filename)
135 }
136 fs.writeFile(filename, content, (err, res) => {
137 if (err) {
138 return reject(err)
139 }
140 return resolve(res)
141 })
142 })
143
144/**
145 * Read the locales from the localesDir (specified by --locales) and parse

Callers 4

readLocalesFunction · 0.85
writeLocalesFunction · 0.85
writeInterpreterFileFunction · 0.85
handleDownMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected