* Removes all "_" prefixed properties from an object, except "__type" * @param {Object} obj An object.
(obj)
| 30 | * @param {Object} obj An object. |
| 31 | */ |
| 32 | static removeHiddenProperties(obj) { |
| 33 | for (var key in obj) { |
| 34 | if (Object.prototype.hasOwnProperty.call(obj, key)) { |
| 35 | // Regexp comes from Parse.Object.prototype.validate |
| 36 | if (key !== '__type' && !/^[A-Za-z][0-9A-Za-z_]*$/.test(key)) { |
| 37 | delete obj[key]; |
| 38 | } |
| 39 | } |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | /** |
| 44 | * After retrieving a user directly from the database, we need to remove the |
no outgoing calls
no test coverage detected