MCPcopy
hub / github.com/mgonto/restangular / stripRestangular

Function stripRestangular

src/restangular.js:966–976  ·  view source on GitHub ↗
(elem)

Source from the content-addressed store, hash-verified

964
965 // Elements
966 function stripRestangular(elem) {
967 if (_.isArray(elem)) {
968 var array = [];
969 _.each(elem, function(value) {
970 array.push(config.isRestangularized(value) ? stripRestangular(value) : value);
971 });
972 return array;
973 } else {
974 return _.omit(elem, _.values(_.omit(config.restangularFields, 'id')));
975 }
976 }
977
978 function addCustomOperation(elem) {
979 elem[config.restangularFields.customOperation] = _.bind(customFunction, elem);

Callers 1

elemFunctionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected