@onehat/data 1.10.2 → 1.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/Repository/Memory.js +5 -2
package/package.json
CHANGED
package/src/Repository/Memory.js
CHANGED
|
@@ -253,8 +253,11 @@ class MemoryRepository extends Repository {
|
|
|
253
253
|
static _getNatSort = (sorter) => {
|
|
254
254
|
const
|
|
255
255
|
name = sorter.name,
|
|
256
|
-
direction = sorter.direction.toUpperCase()
|
|
257
|
-
|
|
256
|
+
direction = sorter.direction.toUpperCase();
|
|
257
|
+
|
|
258
|
+
const ns = natsort.default || natsort; // When imported into cypress, natsort has default, when in React Native, it doesn't.
|
|
259
|
+
|
|
260
|
+
const sortFn = ns({ desc: direction !== 'ASC', });
|
|
258
261
|
return (entity1, entity2) => {
|
|
259
262
|
const
|
|
260
263
|
a = entity1[name],
|