npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

prefiks

v0.3.3

Published

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

Downloads

2,345

Readme

prefiks

NPM version Build Status Dependency Status Downloads counter

Get the vendors prefixes of a css properties, according to caniuse 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 (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 to examine.

Multiple browsers form

prefiks( feature, browsers )
  • feature is the name of the feature on caniuse website (look at the feat hash value in the URL).
  • browsers is an object of browsers/version to examine, like :
    {
        "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.

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.