Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devgru/z-indices
A simple javascript utility for calculating z-index
https://github.com/devgru/z-indices
Last synced: 4 days ago
JSON representation
A simple javascript utility for calculating z-index
- Host: GitHub
- URL: https://github.com/devgru/z-indices
- Owner: devgru
- License: mit
- Created: 2016-12-11T01:58:27.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-11T14:19:15.000Z (over 7 years ago)
- Last Synced: 2024-10-16T09:06:25.153Z (about 1 month ago)
- Language: JavaScript
- Size: 35.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# z-indices
> A simple javascript utility for calculating z-index.
Distributed as UMD module.
## Installing
```sh
$ yarn add z-indices
# or
$ npm install --save z-indices
```## Usage
Provide configuration dictionary object then pass arrays of keys to calculate z-index.
```js
import zIndices from 'z-indices';const zIndex = zIndices({
'foreground': 10,
'background': 0,
'popup': 1000
});zIndex(['foreground', 'popup']); // 1010
```## Development
* Run tests: `yarn test`;
* Build `yarn build`;## License
MIT © [Dmitriy Semyushkin](https://devg.ru)