Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

shared-store

Package Overview
Dependencies
Maintainers
4
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shared-store - npm Package Compare versions

Comparing version 2.1.4 to 2.2.0

lib/file-alternatives.js

6

CHANGELOG.md

@@ -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 @@

2

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc