Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

stylehacks

Package Overview
Dependencies
Maintainers
7
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stylehacks - npm Package Compare versions

Comparing version 5.1.0 to 5.1.1

7

package.json
{
"name": "stylehacks",
"version": "5.1.0",
"version": "5.1.1",
"description": "Detect/remove browser hacks from CSS files.",

@@ -31,3 +31,3 @@ "main": "src/index.js",

"dependencies": {
"browserslist": "^4.16.6",
"browserslist": "^4.21.4",
"postcss-selector-parser": "^6.0.4"

@@ -46,4 +46,3 @@ },

"postcss": "^8.2.15"
},
"readme": "# stylehacks\n\n> Detect/remove browser hacks from CSS files.\n\n\n## Install\n\nWith [npm](https://npmjs.org/package/stylehacks) do:\n\n```\nnpm install stylehacks --save\n```\n\n\n## Example\n\nIn its default mode, stylehacks will remove hacks from your CSS file, based on\nthe browsers that you wish to support.\n\n### Input\n\n```css\nh1 {\n _color: white;\n color: rgba(255, 255, 255, 0.5);\n}\n```\n\n### Output\n\n```css\nh1 {\n color: rgba(255, 255, 255, 0.5);\n}\n```\n\n\n## API\n\n### `stylehacks.detect(node)`\n\nType: `function` \nReturns: `boolean`\n\nThis method will take any PostCSS *node*, run applicable plugins depending on\nits type, then will return a boolean depending on whether it found any of\nthe supported hacks. For example, if the `decl` node found below is passed to\nthe `detect` function, it will return `true`. But if the `rule` node is passed,\nit will return `false` instead.\n\n```css\nh1 { _color: red }\n```\n\n### `postcss([ stylehacks(opts) ])`\n\nstylehacks can also be consumed as a PostCSS plugin. See the\n[documentation](https://github.com/postcss/postcss#usage) for examples for\nyour environment.\n\n#### options\n\n##### lint\n\nType: `boolean` \nDefault: `false`\n\nIf lint mode is enabled, stylehacks will not remove hacks from the CSS; instead,\nit will add warnings to `Result#messages`.\n\n\n## Related\n\nstylehacks works well with your existing PostCSS setup:\n\n* [stylelint] - Comprehensive & modern CSS linter, to ensure that your code\n style rules are respected.\n\n\n## Contributing\n\nPull requests are welcome. If you add functionality, then please add unit tests\nto cover it.\n\n\n## License\n\nMIT © [Ben Briggs](http://beneb.info)\n\n\n[stylelint]: https://github.com/stylelint/stylelint\n"
}
}

@@ -1,365 +0,6 @@

declare const _exports: {
[n: number]: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
};
length: number;
toString(): string;
toLocaleString(): string;
pop(): {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
} | undefined;
push(...items: ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[]): number;
concat(...items: ConcatArray<{
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}>[]): ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[];
concat(...items: ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
} | ConcatArray<{
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}>)[]): ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[];
join(separator?: string | undefined): string;
reverse(): ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[];
shift(): {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
} | undefined;
slice(start?: number | undefined, end?: number | undefined): ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[];
sort(compareFn?: ((a: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}, b: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}) => number) | undefined): ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[];
splice(start: number, deleteCount?: number | undefined): ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[];
splice(start: number, deleteCount: number, ...items: ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[]): ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[];
unshift(...items: ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[]): number;
indexOf(searchElement: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}, fromIndex?: number | undefined): number;
lastIndexOf(searchElement: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}, fromIndex?: number | undefined): number;
every<S extends {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}>(predicate: (value: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}, index: number, array: ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[]) => value is S, thisArg?: any): this is S[];
every(predicate: (value: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}, index: number, array: ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[]) => unknown, thisArg?: any): boolean;
some(predicate: (value: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}, index: number, array: ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[]) => unknown, thisArg?: any): boolean;
forEach(callbackfn: (value: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}, index: number, array: ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[]) => void, thisArg?: any): void;
map<U>(callbackfn: (value: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}, index: number, array: ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[]) => U, thisArg?: any): U[];
filter<S_1 extends {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}>(predicate: (value: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}, index: number, array: ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[]) => value is S_1, thisArg?: any): S_1[];
filter(predicate: (value: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}, index: number, array: ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[]) => unknown, thisArg?: any): ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[];
reduce(callbackfn: (previousValue: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}, currentValue: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}, currentIndex: number, array: ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[]) => {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}): {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
};
reduce(callbackfn: (previousValue: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}, currentValue: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}, currentIndex: number, array: ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[]) => {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}, initialValue: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}): {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
};
reduce<U_1>(callbackfn: (previousValue: U_1, currentValue: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}, currentIndex: number, array: ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[]) => U_1, initialValue: U_1): U_1;
reduceRight(callbackfn: (previousValue: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}, currentValue: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}, currentIndex: number, array: ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[]) => {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}): {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
};
reduceRight(callbackfn: (previousValue: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}, currentValue: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}, currentIndex: number, array: ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[]) => {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}, initialValue: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}): {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
};
reduceRight<U_2>(callbackfn: (previousValue: U_2, currentValue: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}, currentIndex: number, array: ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[]) => U_2, initialValue: U_2): U_2;
find<S_2 extends {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}>(predicate: (this: void, value: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}, index: number, obj: ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[]) => value is S_2, thisArg?: any): S_2 | undefined;
find(predicate: (value: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}, index: number, obj: ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[]) => unknown, thisArg?: any): {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
} | undefined;
findIndex(predicate: (value: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}, index: number, obj: ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[]) => unknown, thisArg?: any): number;
fill(value: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}, start?: number | undefined, end?: number | undefined): ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[];
copyWithin(target: number, start: number, end?: number | undefined): ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[];
entries(): IterableIterator<[number, {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}]>;
keys(): IterableIterator<number>;
values(): IterableIterator<{
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}>;
includes(searchElement: {
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}, fromIndex?: number | undefined): boolean;
[Symbol.iterator](): IterableIterator<{
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
}>;
[Symbol.unscopables](): {
copyWithin: boolean;
entries: boolean;
fill: boolean;
find: boolean;
findIndex: boolean;
keys: boolean;
values: boolean;
};
};
declare const _exports: ({
new (result?: import("postcss").Result | undefined): important;
} | {
new (result?: import("postcss").Result | undefined): trailingSlashComma;
})[];
export = _exports;
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