@rickard.antonsson/ts-utility 0.0.1 → 0.0.2

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.
Files changed (2) hide show
  1. package/README.md +11 -8
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -15,13 +15,16 @@ const list: {text:string, sortOrder:number} = [<...>];
15
15
  const sortedList = simpleSort(list, i => i.sortOrder, i => [i.text, 'desc']); // sorts by sortOrder ascending and then by text descending
16
16
  ```
17
17
 
18
- #### sortedList could after this be something like:
19
- {
20
- sortOrder: 1, text: 'second',
21
- sortOrder: 1, text: 'first',
22
- sortOrder: 1, text: 'fifth',
23
- sortOrder: 2, text: 'third',
24
- sortOrder: 3, text: 'fourth'
25
- }
18
+ sortedList could after this be something like:
19
+
20
+ ```typescript
21
+ [
22
+ { sortOrder: 1, text: 'second' },
23
+ { sortOrder: 1, text: 'first' },
24
+ { sortOrder: 1, text: 'fifth' },
25
+ { sortOrder: 2, text: 'third' },
26
+ { sortOrder: 3, text: 'fourth' }
27
+ ]
28
+ ```
26
29
 
27
30
  For more examples see tests
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rickard.antonsson/ts-utility",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "",
5
5
  "main": "build/src/index.js",
6
6
  "types": "build/src/index.d.ts",