MCPcopy Create free account
hub / github.com/6dylan6/jdm / filename

Method filename

function/common.js:219–227  ·  view source on GitHub ↗
(file, rename = '')

Source from the content-addressed store, hash-verified

217 }
218 }
219 filename(file, rename = '') {
220 if (!this.runfile) {
221 this.runfile = path.basename(file).replace(".js", '').replace(/-/g, '_')
222 }
223 if (rename) {
224 rename = `_${rename}`;
225 }
226 return path.basename(file).replace(".js", rename).replace(/-/g, '_');
227 }
228 rand(n, m) {
229 var random = Math.floor(Math.random() * (m - n + 1) + n);
230 return random;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected