All files / src/utils coerceIntoArray.js

0% Statements 0/4
0% Branches 0/2
0% Functions 0/1
0% Lines 0/4
1 2 3 4 5 6 7 8 9 10                   
function coerceIntoArray( x ) {
  if ( Array.isArray( x ) === false ) {
    return [ x ];
  } else {
    return x;
  }
}
 
module.exports = coerceIntoArray;