PHP Classes

File: web/js/client/service/service.js

Recommend this page to a friend!
  Classes of Felix Ivan Romero Rodríguez   PHP Web Socket Chat   web/js/client/service/service.js   Download  
File: web/js/client/service/service.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP Web Socket Chat
Chat system using Websockets or AJAX requests
Author: By
Last change:
Date: 7 years ago
Size: 537 bytes
 

Contents

Class file image Download
/** * Created by felito on 2/24/2016. */ chatClient.service('Normalizer',Normalizer); function Normalizer(){ return { cloneObject:function(object){ return _cloneObject(object); } } } /** * Clones an object. * @param obj * @returns {{}} * @private */ function _cloneObject(obj){ var clone = {}; for(var i in obj) { if(typeof(obj[i])=="object" && obj[i] != null) clone[i] = _cloneObject(obj[i]); else clone[i] = obj[i]; } return clone; }