Socket
Socket
Sign inDemoInstall

hav

Package Overview
Dependencies
28
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    hav

get html attribute values


Version published
Weekly downloads
1
Maintainers
1
Install size
527 kB
Created
Weekly downloads
 

Readme

Source

hav

HTML Attribute Values

Install

npm install -g hav

Usage

# Pass a string as stdin and grab its link from the html
> hav link href <<< '<a id="link" href="hello/html" rel="greeting">link</a>'
hello/html

# Get the rel attribute instead of the href attribute
> hav link rel <<< '<a id="link" href="hello/html" rel="greeting">link</a>'
greeting
# Grab a#wind.href from a web site
> curl https://amorris.ca/launch | hav wind href
https://www.windfinder.com/forecast/jericho_beach_park

# Open a#wind.href on a mac
> curl https://amorris.ca/launch | hav wind href | xargs open
https://www.windfinder.com/forecast/jericho_beach_park

curl https://hav.amorris.ca/ | hav .header
curl https://hav.amorris.ca/ | hav .pre text
curl https://hav.amorris.ca/ | hav ^h2 name
curl https://hav.amorris.ca/ | hav ~why text
curl https://hav.amorris.ca/ | hav ~usage text
curl https://amorris.ca/launch/ | hav ^a href
curl https://amorris.ca/launch/ | hav ^a id
curl https://amorris.ca/launch/ | hav music href

FAQs

Last updated on 24 Aug 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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