src/GCM.js
function sliceDevices(devices, chunkSize) {
  let chunkDevices = [];
  while (devices.length > 0) {
    chunkDevices.push(devices.splice(0, chunkSize));
  }
  return chunkDevices;
}
function sliceDevices(devices, chunkSize) {
  let chunkDevices = [];
  while (devices.length > 0) {
    chunkDevices.push(devices.splice(0, chunkSize));
  }
  return chunkDevices;
}
function sliceDevices ( devices , chunkSize ) { let chunkDevices = [ ] ; while ( devices . length > 0 ) { chunkDevices . push ( devices . splice ( 0 , chunkSize ) ) ; } return chunkDevices ; }
Slice a list of devices to several list of devices with fixed chunk size.
@param {Array} devices An array of devices
@param {Number} chunkSize The size of the a chunk
@returns {Array} An array which contaisn several arries of devices with fixed chunk size
Slice a list of devices to several list of devices with fixed chunk size .