Socket
Socket
Sign inDemoInstall

prefiks

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prefiks - npm Package Compare versions

Comparing version 0.2.1 to 0.3.0

8

lib/prefiks.js

@@ -10,3 +10,3 @@

"use strict";
var lodash, oAgents, oCaniuseData, semver, _getBrowser, _versionToSemver;
var fPrefixSort, lodash, oAgents, oCaniuseData, semver, _getBrowser, _versionToSemver;

@@ -21,2 +21,6 @@ oCaniuseData = require("caniuse-db/data.json");

fPrefixSort = function(sPrefix) {
return sPrefix.length;
};
_getBrowser = function(sBrowserName) {

@@ -153,3 +157,3 @@ var oAgent, sAgent;

}
return lodash.unique(aPrefixes);
return lodash.sortBy(lodash.unique(aPrefixes), fPrefixSort).reverse();
};
{
"name": "prefiks",
"version": "0.2.1",
"version": "0.3.0",
"description": "Get the vendors prefixes of a css properties, according to can i use datas.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -19,3 +19,4 @@ # prefiks

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 `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).

@@ -74,2 +75,3 @@ ### One browser form

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

@@ -76,0 +78,0 @@ * **0.1.0**: Initial release (*11/07/14*)

@@ -60,3 +60,3 @@ "use strict";

test.deepEqual( prefiks( "transforms2d", "safari" ), [ "webkit" ], "Should be [ 'webkit' ]." );
test.deepEqual( prefiks( "transforms2d", "opera" ), [ "o", "webkit" ], "Should be [ 'o', 'webkit' ]." );
test.deepEqual( prefiks( "transforms2d", "opera" ), [ "webkit", "o" ], "Should be [ 'webkit', 'o' ]." );
test.deepEqual( prefiks( "transforms2d", "ios_saf" ), [ "webkit" ], "Should be [ 'webkit' ]." );

@@ -92,5 +92,5 @@ test.deepEqual( prefiks( "transforms2d", "op_mini" ), [], "Should be []." );

};
test.deepEqual( prefiks( "transforms2d", oBrowserHashOne ), [ "ms", "webkit", "o" ], "Should be [ 'ms', 'webkit', 'o' ]." );
test.deepEqual( prefiks( "transforms2d", oBrowserHashOne ), [ "webkit", "ms", "o" ], "Should be [ 'webkit', 'ms', 'o' ]." );
test.done();
},
};

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc