(fieldName)
| 2880 | |
| 2881 | // Converts a string in dot notation to an array of its components, with backslash escaping |
| 2882 | function parseField(fieldName) { |
| 2883 | // fields may be deep (e.g. "foo.bar.baz"), so parse |
| 2884 | var fields = []; |
| 2885 | var current = ''; |
| 2886 | for (var i = 0, len = fieldName.length; i < len; i++) { |
| 2887 | var ch = fieldName[i]; |
| 2888 | if (i > 0 && fieldName[i - 1] === '\\' && (ch === '$' || ch === '.')) { |
| 2889 | // escaped delimiter |
| 2890 | current = current.substring(0, current.length - 1) + ch; |
| 2891 | } else if (ch === '.') { |
| 2892 | // When `.` is not escaped (above), it is a field delimiter |
| 2893 | fields.push(current); |
| 2894 | current = ''; |
| 2895 | } else { // normal character |
| 2896 | current += ch; |
| 2897 | } |
| 2898 | } |
| 2899 | fields.push(current); |
| 2900 | return fields; |
| 2901 | } |
| 2902 | |
| 2903 | var combinationFields = ['$or', '$nor', '$not']; |
| 2904 | function isCombinationalField(field) { |
no outgoing calls
no test coverage detected
searching dependent graphs…