Socket
Socket
Sign inDemoInstall

css-revealer

Package Overview
Dependencies
37
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"name": "css-revealer",
"version": "1.0.2",
"version": "1.0.3",
"description": "Reveal CSS selector usage within HTML templates.",

@@ -5,0 +5,0 @@ "bin": {

@@ -52,11 +52,18 @@ # css-revealer

### `cssRevealer(options:Object)`
```js
var cssRevealer = require('cssRevealer');
```
* `options.stylesheets` (required) array of globs specifying which stylesheets to extract selectors from.
* `options.templates` (required) array of globs specifying which templates to check for selector presence.
* `options.format` (optional) either a string specifying which built-in report format to use (`markdown` or `json`), or a custom format function which gets passed the `result` object.
* `options.done` (optional) function to execute when the report is complete. It gets passed an `error` (which can be `null`) and the formatted `result`.
### `cssRevealer(options)`
## Notes
`options.stylesheets` is a required array of globs specifying which stylesheets to extract selectors from.
`options.templates` is a required array of globs specifying which templates to check for selector presence.
`options.format` is an optional string specifying which built-in report format to use [`json`](test/fixtures/format.json) or [`markdown`](test/fixtures/format.md), or a custom format function which gets passed the [`result`](test/fixtures/result.js) object. Defaults to `json`.
`options.done` is an optional function to execute when the report is complete. It gets passed an `error` (which can be `null`) and the formatted `result`.
## Implementation notes
* [isaacs/node-glob](https://github.com/isaacs/node-glob) is the glob implementation.

@@ -71,2 +78,6 @@ * [reworkcss/css](https://github.com/reworkcss/css) is the underlying CSS parser.

$ npm test
```
```
## License
MIT
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