INNER CODE UNIT · JavaScript
last_opt
danburzo/percollate · src/cli-opts.js:29
last_opt = m[1][m[1].length - 1];
if (m[1].split('').some(f => fn_opt(f) === false)) {
return;
}
continue;
}
// --x=y
if ((m = curr.match(/^--([a-zA-Z0-9\-.]+)(?:=([^]*))?$/))) {
last_opt = m[2] === undefined ? m[1] : undefined;
if (fn_opt(m[1], m[2]) === false) {
return;
}
continue;
}
if (curr === '--') {
if (fn_delim(curr, last_opt) === false) {