How to use the steno.writeFile function in steno

To help you get started, we’ve selected a few steno examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github natecavanaugh / github-pulls / app / app / utils / jsop.js View on Github external
var write = _.debounce(function() {
			steno.writeFile(
				filename,
				JSON.stringify(object, null, 2),
				err => {
					if (err) {
						console.error(err);
					}
				}
			);
		}, 10);
github CreaturePhil / origindb / index.js View on Github external
function write(file, json, cb) {
    var fileDir = path.join(dbDir, file + '.json');
    steno.writeFile(fileDir, JSON.stringify(json, null, 2), function(err) {
      if (err) throw err;
    });
  }
github typicode / lowdb / src / disk.js View on Github external
write: function (file, data) {
    steno.writeFile(file, data, function (err) {
      if (err) throw err
    })
  },
github CreaturePhil / origindb / src / adapters / files.js View on Github external
function save(file) {
    const checksum = JSON.stringify(objects[file]);

    if (checksums[file] === checksum) return;

    checksums[file] = checksum;

    const fileDir = path.join(name, file + '.json');

    steno.writeFile(fileDir, JSON.stringify(objects[file], null, 2), (err) => {
      if (err) throw err;
    });
  }

steno

Specialized fast async file writer

MIT
Latest version published 5 months ago

Package Health Score

75 / 100
Full package analysis