Socket
Socket
Sign inDemoInstall

postcss-zindex

Package Overview
Dependencies
4
Maintainers
7
Versions
43
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.0.2 to 5.1.0

types/index.d.ts

6

package.json
{
"name": "postcss-zindex",
"version": "5.0.2",
"version": "5.1.0",
"description": "Reduce z-index values with PostCSS.",
"main": "src/index.js",
"types": "types/index.d.ts",
"files": [
"LICENSE-MIT",
"src"
"src",
"types"
],

@@ -10,0 +12,0 @@ "keywords": [

'use strict';
const LayerCache = require('./lib/layerCache');
/** @typedef {{startIndex?: number}} Options */
/**
* @type {import('postcss').PluginCreator<Options>}
* @param {Options} opts
* @return {import('postcss').Plugin}
*/
function pluginCreator(opts = {}) {

@@ -11,2 +17,3 @@ return {

OnceExit(css) {
/** @type {import('postcss').Declaration[]} */
const nodes = [];

@@ -13,0 +20,0 @@ let abort = false;

'use strict';
/** @constructor */
function LayerCache() {

@@ -6,2 +7,7 @@ this._values = new Map();

/**
* @param {number} a
* @param {number} b
* @return {number}
*/
function ascending(a, b) {

@@ -11,2 +17,6 @@ return a - b;

/**
* @param {number} startIndex
* @return {void}
*/
LayerCache.prototype.optimizeValues = function (startIndex) {

@@ -19,2 +29,6 @@ const sortedValues = Array.from(this._values.keys()).sort(ascending);

/**
* @param {string} value
* @return {void}
*/
LayerCache.prototype.addValue = function (value) {

@@ -31,2 +45,6 @@ let parsedValue = parseInt(value, 10);

/**
* @param {string} value
* @return {string}
*/
LayerCache.prototype.getValue = function (value) {

@@ -33,0 +51,0 @@ let parsedValue = parseInt(value, 10);

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc