inline.js 248 B

123456789101112131415
  1. function inlineOptionsFrom(rules) {
  2. if (Array.isArray(rules)) {
  3. return rules;
  4. }
  5. if (rules === false) {
  6. return ['none'];
  7. }
  8. return undefined === rules ?
  9. ['local'] :
  10. rules.split(',');
  11. }
  12. module.exports = inlineOptionsFrom;