simple-update-in
Advanced tools
Comparing version 2.0.2-0 to 2.0.2-master.004542e
@@ -12,3 +12,3 @@ # Changelog | ||
- Emitting UMD bundle for browser | ||
- `<script src="https://unpkg.com/simple-update-in/latest/dist/simple-update-in.production.min.js"></script>` | ||
- `<script src="https://unpkg.com/simple-update-in/dist/simple-update-in.production.min.js"></script>` | ||
- `<script>window.simpleUpdateIn({ abc: 123, def: 456 }, ['xyz'], () => 789);</script>` | ||
@@ -15,0 +15,0 @@ |
{ | ||
"name": "simple-update-in", | ||
"version": "2.0.2-0", | ||
"version": "2.0.2-master.004542e", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "browser": "dist/simple-update-in.production.min.js", |
@@ -28,2 +28,15 @@ # simple-update-in | ||
Number| | ||
String | ||
)[], | ||
updater?: (value: any) => any | ||
): T | ||
``` | ||
Or the asynchronous version, which you can provide an asynchronous predicate or updater: | ||
```js | ||
updateInAsync<T: Array|Map>( | ||
target: T, | ||
path: ( | ||
Number| | ||
String| | ||
@@ -33,3 +46,3 @@ (key: (Number|String), value: any) => Promise<Boolean>|Boolean | ||
updater?: (value: any) => Promise<any>|any | ||
): T | ||
): Promise<T> | ||
``` | ||
@@ -46,3 +59,3 @@ | ||
```html | ||
<script src="https://unpkg.com/simple-update-in/latest/dist/simple-update-in.production.min.js"></script> | ||
<script src="https://unpkg.com/simple-update-in/dist/simple-update-in.production.min.js"></script> | ||
<script> | ||
@@ -49,0 +62,0 @@ window.simpleUpdateIn({ abc: 123, def: 456 }, ['xyz'], () => 789); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45367
276