Socket
Socket
Sign inDemoInstall

anchors

Package Overview
Dependencies
15
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    anchors

Extract anchor tags from HTML and parse them into objects with useful information.


Version published
Weekly downloads
2
decreased by-60%
Maintainers
1
Install size
3.46 MB
Created
Weekly downloads
 

Readme

Source

anchors NPM version

Extract anchor tags from HTML and parse them into objects with useful information.

Install with npm:

npm i -g anchors --save-dev

Usage

var anchors = require("anchors");
console.log(anchors);

Returns an object like the following for each anchor tag:

{
  "class": "link",
  "title": "Assemble Docs",
  "name": "",
  "alt": "",
  "rel": "",
  "href": {
    "protocol": "https:",
    "slashes": true,
    "auth": null,
    "host": "github.com",
    "port": null,
    "hostname": "github.com",
    "hash": null,
    "search": null,
    "query": null,
    "pathname": "/assemble/assemble-docs/blob/master/LICENSE-MIT",
    "path": "/assemble/assemble-docs/blob/master/LICENSE-MIT",
    "href": "https://github.com/assemble/assemble-docs/blob/master/LICENSE-MIT"
  }
}

Author

Jon Schlinkert

License

Copyright (c) 2014 Jon Schlinkert, contributors. Released under the MIT license


This file was generated by Phaser on March 14, 2014.

Keywords

FAQs

Last updated on 20 Mar 2014

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