# prefiks

> Get the vendors prefixes of a css properties, according to can i use datas.

Latest version **0.3.3** (published 2014-10-08) · 0 weekly downloads

## Install

```sh
npm install prefiks
pnpm add prefiks
yarn add prefiks
bun add prefiks
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.3 |
| Published | 2014-10-08 |
| First published | 2014-07-11 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10 |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+5 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Leny |
| Maintainers | leny, krkn |
| Keywords | caniuse, prefix, css, property |

## Links

- npm: https://www.npmjs.com/package/prefiks
- Repository: https://github.com/leny/prefiks
- Issues: https://github.com/leny/prefiks/issues
- npm.io page: https://npm.io/package/prefiks

## Dependencies (3)

- [lodash](https://npm.io/package/lodash.md) ^2.4.1
- [semver](https://npm.io/package/semver.md) ^4.0.3
- [caniuse-db](https://npm.io/package/caniuse-db.md) ^1.0

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 0.3.3 (latest) — 2014-10-08
- 0.3.2 — 2014-07-24
- 0.3.1 — 2014-07-14
- 0.3.0 — 2014-07-14
- 0.2.1 — 2014-07-14
- 0.2.0 — 2014-07-14
- 0.1.1 — 2014-07-14
- 0.1.0 — 2014-07-11

## README

# prefiks 

![NPM version](http://img.shields.io/npm/v/prefiks.svg) ![Build Status](http://img.shields.io/travis/leny/prefiks.svg) ![Dependency Status](https://david-dm.org/leny/prefiks.svg) ![Downloads counter](http://img.shields.io/npm/dm/prefiks.svg)

> Get the vendors prefixes of a css properties, according to [caniuse](http://caniuse.com) datas.

* * * 

## Getting Started

Install the module with: `npm install prefiks`

Include it in your scripts with: `prefiks = require( "prefiks" );`

## Documentation

The **prefiks** module exposes a function that can be called by two different forms.

The `prefix` functions returns an array with the prefixes to use for the given browser(s) versions (it always returns an array, even empty).  
The prefixes are reverse-ordered by length (longest prefix first).

### One browser form

    prefiks( feature, browser [, version_range = "*" ] )
    
* `feature` is the name of the feature on [caniuse website](http://caniuse.com) (look at the *feat* hash value in the URL).
* `browser` is the name of the browser to examine.
* `version_range` is a [semver version range](https://github.com/isaacs/node-semver#ranges) to examine.

### Multiple browsers form

    prefiks( feature, browsers )
    
* `feature` is the name of the feature on [caniuse website](http://caniuse.com) (look at the *feat* hash value in the URL).
* `browsers` is an object of browsers/version to examine, like :

```javascript
    {
        "Internet Explorer": 9,
        "chrome": "<=30",
        "firefox": ">28",
        "opera": "*"
    }
```

### `browser`'s aliases

The supported values for `browser` argument are listed bellow. These are **case insensitive**.

* `ie`, `internet explorer`, `internet-explorer`, `internet_explorer`, `internetexplorer`
* `firefox`, `ff`
* `chrome`
* `safari`
* `opera`
* `ios_saf`, `ios`, `ios-safari`
* `op_mini`, `opera-mini`, `opera_mini`, `operamini`
* `android`, `android-browser`
* `op_mob`, `opera-mobile`, `operamobile`, `opera_mobile`
* `bb`, `blackberry`, `blackberry-browser`
* `and_chr`, `android-chrome`, `android_chrome`, `androidchrome`
* `and_ff`, `android-firefox`, `android_firefox`, `androidfirefox`
* `ie_mob`, `ie-mobile`, `ie_mobile`, `iemobile`

## Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).

### TODO

- [ ] Add more browsers aliases
- [ ] Add more test cases
- [ ] AMD implementation

## Release History

* **0.3.0**: Sorting prefixes by length (*14/07/14*)
* **0.2.0**: Multiple browser form (*14/07/14*)
* **0.1.0**: Initial release (*11/07/14*)

## License
Copyright (c) 2014 Leny  
Licensed under the MIT license.

---
_Source: https://npm.io/package/prefiks · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
