Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fujiharuka/consts-overlay
https://github.com/fujiharuka/consts-overlay
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/fujiharuka/consts-overlay
- Owner: FujiHaruka
- Created: 2018-11-07T07:33:42.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T02:10:17.000Z (almost 2 years ago)
- Last Synced: 2024-11-07T12:04:50.144Z (8 days ago)
- Language: JavaScript
- Size: 789 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
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'
// }
```