/* jshint node: true */
/**
 * Wake Up Platform
 * (c) Telefonica Digital, 2014 - All rights reserved
 * License: GNU Affero V3 (see LICENSE file)
 * Fernando Rodríguez Sela <frsela at tid dot es>
 * Guillermo López Leal <gll at tid dot es>
 */

'use strict';

module.exports.checkCallback = function checkCallback(callback) {
  if (typeof(callback) != 'function') {
    callback = function() {};
  }
  return callback;
};

function s4() {
  return Math.floor((1 + Math.random()) * 0x10000)
      .toString(16)
      .substring(1);
}

module.exports.uuid = function guid() {
  return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
      s4() + '-' + s4() + s4() + s4();
};

@@ -488,18 +488,16 @@
 00)%0A    
-  
 .toStrin
@@ -502,18 +502,16 @@
 ing(16)%0A
-  
     .sub
@@ -619,18 +619,16 @@
 + '-' +%0A
-  
     s4()

Update helpers.js