mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-23 00:45:16 +00:00
16 lines
248 B
JavaScript
16 lines
248 B
JavaScript
function inlineOptionsFrom(rules) {
|
|
if (Array.isArray(rules)) {
|
|
return rules;
|
|
}
|
|
|
|
if (rules === false) {
|
|
return ['none'];
|
|
}
|
|
|
|
return undefined === rules ?
|
|
['local'] :
|
|
rules.split(',');
|
|
}
|
|
|
|
module.exports = inlineOptionsFrom;
|