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

amznjp-url-normalize

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amznjp-url-normalize

Normalize URL of Amazon.co.jp

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by400%
Maintainers
1
Weekly downloads
 
Created
Source

amznjp-url-normalize

npm version Build Status Coverage Status Dependency Status devDependency Status

The URL normalizer of Amazon.co.jp. It works in Node.js, but any browsers not supported.

Usage

var normalize = require('amznjp-url-normalize');

var url = 'http://www.amazon.co.jp/gp/product/B00Q5QBZCA/ref=s9_qpp_gw_p15_d7_i4?'
  + 'pf_rd_m=AN1VRQENFRJN5&pf_rd_s=center-3&'
  + 'pf_rd_r=05NNNANYG90DWEXJPA9W&pf_rd_t=101&'
  + 'pf_rd_p=155416509&pf_rd_i=489986';

normalize(url, function (err, params) {
  if (err) {
    console.error(err);
    return;
  }

  console.log(params.asin); // => 'B00Q5QBZCA'
  console.log(params.url);  // => 'http://www.amazon.co.jp/dp/B00Q5QBZCA'
});

References

normalize(url, cb)

normalize("The URL of Amazon.co.jp", function (err, params) {
  // params.asin
  // params.url
});

normalize(url, options, cb)

var options = {
  prefix: 'http://www.amazon.co.jp/dp/', // A prefix of result URL
  suffix: '' // A suffix of result URL
};

normalize("The URL of Amazon.co.jp", options, function (err, params) {
  // params.asin
  // params.url
});

License

MIT License

FAQs

Package last updated on 21 May 2016

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