Sha256: bd0571f2d3d801f8a964a812fe4c4eafc3be4e7cecf7401d9fcd872c6a23e327
Contents?: true
Size: 761 Bytes
Versions: 9
Compression:
Stored size: 761 Bytes
Contents
class $paramSerializer extends AngularServiceModel @register(MaterialRaingular.app) @inject('$httpParamSerializer') clean: (obj) -> @$httpParamSerializer @update(obj) update: (obj) -> res = {} for key,val of @strip(obj) continue if val == obj['$' + key + '_was'] continue if val?.toString() == obj['$' + key + '_was']?.toString() res[key] = val res strip: (obj) -> res = {} for key,val of obj continue if ['$','_'].includes(key[0]) || key in ['constructor','initialize'] res[key] = if (typeof val == 'object' && val != null && !val instanceof Date) then @strip(val) else val res create: (obj) -> res = {} for key,val of @strip(obj) continue unless val res[key] = val res
Version data entries
9 entries across 9 versions & 1 rubygems