simple-update-in
Advanced tools
Comparing version 1.4.1-master.ea7196c to 1.4.1-master.f9cbbf0
{ | ||
"name": "simple-update-in", | ||
"version": "1.4.1-master.ea7196c", | ||
"version": "1.4.1-master.f9cbbf0", | ||
"description": "", | ||
@@ -12,3 +12,3 @@ "main": "lib/index.js", | ||
"clean": "npx rimraf lib", | ||
"versionCommit": "npx gulp-cli version-commit", | ||
"coveralls": "cat ./coverage/lcov.info | coveralls", | ||
"test": "jest" | ||
@@ -21,4 +21,7 @@ }, | ||
"keywords": [ | ||
"asynchronous", | ||
"immutable", | ||
"predicate", | ||
"update", | ||
"updater", | ||
"update-in" | ||
@@ -44,4 +47,5 @@ ], | ||
"babel-plugin-add-module-exports": "^1.0.0", | ||
"coveralls": "^3.0.2", | ||
"jest": "^23.6.0" | ||
} | ||
} |
@@ -5,3 +5,3 @@ # simple-update-in | ||
[![npm version](https://badge.fury.io/js/simple-update-in.svg)](https://badge.fury.io/js/simple-update-in) [![Build Status](https://travis-ci.org/compulim/simple-update-in.svg?branch=master)](https://travis-ci.org/compulim/simple-update-in) | ||
[![npm version](https://badge.fury.io/js/simple-update-in.svg)](https://badge.fury.io/js/simple-update-in) [![Build Status](https://travis-ci.org/compulim/simple-update-in.svg?branch=master)](https://travis-ci.org/compulim/simple-update-in) [![Coverage Status](https://coveralls.io/repos/github/compulim/simple-update-in/badge.svg?branch=feat-coveralls)](https://coveralls.io/github/compulim/simple-update-in?branch=feat-coveralls) | ||
@@ -27,4 +27,8 @@ We love [ImmutableJS](https://facebook.github.io/immutable-js). But sometimes, we want to start something from small. Thus, we created this package with zero dependencies. | ||
target: T, | ||
path: (Number|String)[], | ||
updater?: (value: any) => any | ||
path: ( | ||
Number| | ||
String| | ||
(key: (Number|String), value: any) => Promise<Boolean>|Boolean | ||
)[], | ||
updater?: (value: any) => Promise<any>|any | ||
): T | ||
@@ -96,3 +100,3 @@ ``` | ||
### Asynchronous update | ||
## Asynchronous update | ||
@@ -99,0 +103,0 @@ You can also use an asynchronous updater to update the content. Instead of using the exported `default` function, you will need to use the `updateInAsync` function instead. |
25062
252
9