shared-store
Advanced tools
Comparing version 2.1.4 to 2.2.0
@@ -0,1 +1,7 @@ | ||
### 2.2.0 | ||
* feat: add fileAlternativesContent() handler - **[@dbushong](https://github.com/dbushong)** [#34](https://github.com/groupon/shared-store/pull/34) | ||
- [`0c8e56f`](https://github.com/groupon/shared-store/commit/0c8e56f16bcf30f908fe17ee9533564c8cbdbdd2) **feat:** add fileAlternativesContent() handler | ||
### 2.1.4 | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "shared-store", | ||
"version": "2.1.4", | ||
"version": "2.2.0", | ||
"description": "Keeping config data in sync", | ||
@@ -5,0 +5,0 @@ "license": "BSD-3-Clause", |
@@ -144,3 +144,25 @@ # shared-store | ||
### `fileAlternativesContent([filename, ...], options)` | ||
```js | ||
var fileAlternativesContent = require('shared-store/file-alternatives'); | ||
``` | ||
An observable representing the content of a single file, chosen from among | ||
multiple alternatives. All of the alternatives in the array argument are | ||
checked for existence. Iff exactly one exists, it is passed along with | ||
`options` to `fileContent()`. This is useful for multiple extensions: | ||
```js | ||
fileAlternativesContent(['some-file.cson', 'some-file.json'], options) | ||
``` | ||
or for a legacy path location and a new path location: | ||
```js | ||
fileAlternativesContent([oldestPath, oldPath, currentPath], options) | ||
``` | ||
If more than one or none of the paths exist, it is an error. | ||
### `httpResource({fetch, interval})` | ||
@@ -147,0 +169,0 @@ |
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
60302
17
1123
267
5