aes加密

资料

process

  • 改变工作目录: process.chdir(path);

路径计算

获取调用执行所在文件地址

function getCaller() {
  try {
    var err = new Error();
    var callerfile;
    var currentfile;
    var origPrepareStackTrace = Error.prepareStackTrace;

    Error.prepareStackTrace = function (err, stack) { return stack; };
    currentfile = err.stack.shift().getFileName();
    Error.prepareStackTrace = origPrepareStackTrace;

    while (err.stack.length) {
      callerfile = err.stack.shift().getFileName();
      if(currentfile !== callerfile) return callerfile;
    }
  } catch (err) {}
  return undefined;
};
  • 相关: a, b, c;

计算运行时间

console.time('test');
.....
console.timeEnd('test');

相关文章:

  • 2022-01-31
  • 2022-03-01
  • 2022-01-04
  • 2022-12-23
  • 2021-07-18
  • 2022-03-07
  • 2021-10-03
  • 2021-11-14
猜你喜欢
  • 2021-11-24
  • 2021-12-24
  • 2021-07-05
  • 2022-02-03
  • 2021-08-01
  • 2021-08-19
相关资源
相似解决方案