@rnw-community/shared 0.52.0 → 0.53.0
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 +2 -2
- package/readme.md +3 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rnw-community/shared",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.53.0",
|
|
4
4
|
"description": "Shared useful utils and types",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"generic utils",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"clear": "rm -rf coverage && rm -rf dist && rm -f *.tsbuildinfo",
|
|
43
43
|
"clear:deps": "rm -rf ./node_modules && rm -rf ./dist"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "4ea55d84a33098abf2830f86bb94ba44f7ee0c20"
|
|
46
46
|
}
|
package/readme.md
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Generic types and utilities commonly used across packages.
|
|
4
4
|
|
|
5
|
+
[](https://badge.fury.io/js/%40rnw-community%2Fshared)
|
|
6
|
+
[](https://www.npmjs.com/package/%40rnw-community%2Fshared)
|
|
7
|
+
|
|
5
8
|
## Types
|
|
6
9
|
|
|
7
10
|
### `Maybe<T>`
|
|
@@ -105,7 +108,6 @@ Checks if value is defined and returns it, otherwise returns a result of `defaul
|
|
|
105
108
|
expect(getDefined(undefined, () => 'default value')).toEqual('default value');
|
|
106
109
|
expect(getDefined(null, () => 'default value')).toEqual('default value');
|
|
107
110
|
expect(getDefined('defined value', () => 'default value')).toEqual('defined value');
|
|
108
|
-
|
|
109
111
|
```
|
|
110
112
|
|
|
111
113
|
### `getDefinedAsync`
|
|
@@ -120,9 +122,6 @@ expect(await getDefinedAsync(null, async () => 'default value')).resolves.toEqua
|
|
|
120
122
|
expect(await getDefinedAsync('defined value', async () => 'default value')).resolves.toEqual('defined value');
|
|
121
123
|
```
|
|
122
124
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
125
|
## Type guards
|
|
127
126
|
|
|
128
127
|
Convenient [typescript type guards](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) for everyday usage.
|