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

oust

Package Overview
Dependencies
Maintainers
3
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oust - npm Package Compare versions

Comparing version 1.0.5 to 1.1.0

15

index.js

@@ -47,2 +47,6 @@ /*!

attribute: 'src'
},
styles: {
selector: 'style',
method: 'text'
}

@@ -68,10 +72,17 @@ };

let value = '';
if (chosenType.method && $element[chosenType.method]) {
value = $element[chosenType.method]();
} else if (chosenType.attribute) {
value = $element.attr(chosenType.attribute);
}
if (raw) {
return {
$el: $element,
value: $element.attr(chosenType.attribute)
value
};
}
return $element.attr(chosenType.attribute);
return value;
});

@@ -78,0 +89,0 @@ }

2

package.json
{
"name": "oust",
"version": "1.0.5",
"version": "1.1.0",
"author": "Addy Osmani <addyosmani@gmail.com> (https://addyosmani.com/)",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

@@ -49,2 +49,8 @@ # oust [![Build Status](https://github.com/addyosmani/oust/workflows/Tests/badge.svg)](https://github.com/addyosmani/oust/actions?workflow=Tests) [![dependencies Status](https://img.shields.io/david/addyosmani/oust.svg)](https://david-dm.org/addyosmani/oust) [![devDependencies Status](https://img.shields.io/david/dev/addyosmani/oust.svg)](https://david-dm.org/addyosmani/oust?type=dev)

#### Extract style preload references `<link rel="preload" as="style">`
```js
const hrefs = oust(htmlString, 'preload');
```
#### Extract URL references `<a href>`

@@ -62,2 +68,8 @@

#### Extract inline styles `<style>...</style>`
```js
const styles = oust(htmlString, 'styles');
```
#### Extract cheerio elements alongside the value

@@ -86,3 +98,3 @@

`src` | not set | a valid HTML string to parse for references
`type` | not set | one of `stylesheets`, `scripts`, `imports`, `links`, `images`
`type` | not set | one of `stylesheets`, `scripts`, `imports`, `preload`, `styles`, `links`, `images`

@@ -89,0 +101,0 @@ ## CLI

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