@segment/canonical

Get the current page's canonical URL.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@segment/canonical
7171.0.06 years ago6 years agoMinified + gzip package size for @segment/canonical in KB

Readme

canonical
CircleCI Codecov
Returns the canonical URL for the page.

Installation

$ npm install @segment/canonical

Example

<html>
<head>
  <link rel="canonical" href="http://example.com" />
</head>
</html>

var canonical = require('canonical');
canonical(); // http://example.com