UNPKG

ember-app-scheduler

Version:

Ember addon to schedule work at different phases of app life cycle.

16 lines (12 loc) 367 B
'use strict'; module.exports = function(option, commandArgs) { let results = [], value, i; let optionIndex = commandArgs.indexOf(option); if (optionIndex === -1) { return results; } for (i = optionIndex + 1; i < commandArgs.length; i++) { value = commandArgs[i]; if (/^\-+/.test(value)) { break; } results.push(value); } return results; };