INNER CODE UNIT · JavaScript

push

adaltas/node-csv · packages/csv-generate/lib/index.js:50

  const push = () => {
    this.state.count_written++;
    this.push(record);
    if (this.state.end === true) {
      return this.push(null);
    }
  };
  if (this.options.sleep > 0) setTimeout(push, this.options.sleep);
  else push();
};

const generate = function () {
  let options;
  let callback;
  if (arguments.length === 2) {
    options = arguments[0];
    callback = arguments[1];
  } else if (arguments.length === 1) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…