INNER CODE UNIT · JavaScript

init

asklokesh/loki-mode · src/audit/index.js:31

function init(projectDir) {
  var dir = projectDir || process.cwd();
  if (_initialized && _projectDir === dir) return;
  if (_initialized) destroy();

  _projectDir = dir;
  _log = new AuditLog({ projectDir: dir });
  _residency = new ResidencyController({ projectDir: dir });
  _initialized = true;
}

/**
 * Record an audit entry.
 */
function record(entry) {
  if (!_initialized) init();
  return _log.record(entry);
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…