(val, key)
| 3186 | */ |
| 3187 | |
| 3188 | function _handleSortValue(val, key) { |
| 3189 | if (val === 1 || val === 'asc' || val === 'ascending') { |
| 3190 | return 1; |
| 3191 | } |
| 3192 | if (val === -1 || val === 'desc' || val === 'descending') { |
| 3193 | return -1; |
| 3194 | } |
| 3195 | if (val?.$meta != null) { |
| 3196 | return { $meta: val.$meta }; |
| 3197 | } |
| 3198 | throw new TypeError('Invalid sort value: { ' + key + ': ' + val + ' }'); |
| 3199 | } |
| 3200 | |
| 3201 | /** |
| 3202 | * Declare and/or execute this query as a `deleteOne()` operation. Works like |
no outgoing calls
no test coverage detected
searching dependent graphs…