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

amputator

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amputator

An NPM package to find canonical links of websites

  • 1.3.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
Maintainers
1
Weekly downloads
 
Created
Source

An NPM package to fetch the canonical links from websites just enter the link and get the canonical link,

Why use amputator?

A lot of links especially AMP (Accelerated Mobile Pages) links are taking over the internet. For example, Google mobile Search’s Top Stories carousel has a premium position above of all other results, which is only accessible for cached AMP pages. This has the effect of further reinforcing Google’s dominance of the Web. (Source: Amputatorbot). This package will help you get the canonical links without being dependent on a website.

How To Use

var Amp = require('amputator');

(async function() {
var amp = new Amp();
var canonical = await amp.canon("https://www.google.com/amp/s/electrek.co/2018/06/19/tesla-model-3-assembly-line-inside-tent-elon-musk/amp/");
console.log(canonical);
})();

Which gives the following result,

{
  "success": true,
  "title": "Tesla's new Model 3 assembly line inside a 'tent' is 'way better' and cheaper than other line, says Elon Musk - Electrek",
  "canonical": 'https://electrek.co/2018/06/19/tesla-model-3-assembly-line-inside-tent-elon-musk/'
}

Installation

npm i amputator --save

Requirements

  • Node.Js installed

Dev Dependencies

  • Axios
  • Cheerio

Contact and Contributions

Add a pull request or raise an issue if you wish to contribute.

License

This project is licensed under GNU General Public License, See LICENSE for more information

Keywords

FAQs

Package last updated on 07 Apr 2022

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc