Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fujiharuka/consts-overlay


https://github.com/fujiharuka/consts-overlay

Last synced: 5 days ago
JSON representation

Awesome Lists containing this project

README

        

# consts-overlay

Function to overlay a constants object.

## Installation

```
$ npm install consts-overlay
```

## Usage

```javascript
const consts = require('consts-overlay')
const Consts = consts({
FOO: 'foo',
BAR: 'bar',
}).overlay({
FOO: 'foofoo',
BAZ: 'baz' // ignored if a key is not in the original object
})
// {
// FOO: 'foofoo',
// BAR: 'bar'
// }
```