Tiered Map
A simple map of key value pairs with support for tiers (e.g. defaults go at tier 25, standards go at 50, and overrides go at tier 75)
Usage
var TieredMap = var m = tiers: 'high': 75 { console } m // name defaults to ben (default level is 50)m // name will stay bobm // name will become bobm // name will become john console // will output johnconsole // will output nothingconsole // will output bob console // will output 75
Very useful for having multiple tiers of data attributes with different priorities. For example, you could have default values at tier 25, adjusted values at tier 50, and override values at tier 75.
Install
- Install:
npm install --save tiered-map
- Import:
import * as pkg from ('tiered-map')
- Require:
const pkg = require('tiered-map')
Editions
This package is published with the following editions:
tiered-map
aliasestiered-map/source/index.js
tiered-map/source/index.js
is ESNext source code for Node.js 10 || 12 || 13 || 14 with Require for modulestiered-map/edition-browsers/index.js
is ESNext compiled for web browsers with Require for modules
History
Discover the release history by heading on over to the HISTORY.md
file.
Contribute
Discover how you can contribute by heading on over to the CONTRIBUTING.md
file.
Backers
Maintainers
These amazing people are maintaining this project:
Sponsors
No sponsors yet! Will you be the first?
Contributors
These amazing people have contributed code to this project:
Discover how you can contribute by heading on over to the CONTRIBUTING.md
file.
License
Unless stated otherwise all works are:
- Copyright © 2015+ Bevry Pty Ltd
and licensed under: