amznjp-url-normalize
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -40,3 +40,3 @@ /*jslint node: true */ | ||
if (!matches) { | ||
cb('URL is invalid'); | ||
return cb('URL is invalid'); | ||
} | ||
@@ -43,0 +43,0 @@ |
{ | ||
"name": "amznjp-url-normalize", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Normalize URL of Amazon.co.jp", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
amznjp-url-normalize | ||
-------------------- | ||
[![npm version](https://badge.fury.io/js/amznjp-url-normalize.svg)](http://badge.fury.io/js/amznjp-url-normalize) | ||
[![Build Status](https://travis-ci.org/pine613/amznjp-url-normalize.svg?branch=master)](https://travis-ci.org/pine613/amznjp-url-normalize) | ||
@@ -22,2 +23,3 @@ [![Dependency Status](https://david-dm.org/pine613/amznjp-url-normalize.svg)](https://david-dm.org/pine613/amznjp-url-normalize) | ||
console.error(err); | ||
return; | ||
} | ||
@@ -30,4 +32,29 @@ | ||
## リファレンス | ||
### normalize(url, cb) | ||
```js | ||
normalize("Amazon.co.jp の商品ページの URL", function (err, params) { | ||
// params.asin | ||
// params.url | ||
}); | ||
``` | ||
### normalize(url, options, cb) | ||
```js | ||
var options = { | ||
prefix: 'http://www.amazon.co.jp/dp/', // ASIN の前につける文字列 | ||
suffix: '' // ASIN の後につける文字列 | ||
}; | ||
normalize("Amazon.co.jp の商品ページの URL", options, function (err, params) { | ||
// params.asin | ||
// params.url | ||
}); | ||
``` | ||
## ライセンス | ||
MIT License<br /> | ||
Copyright (c) 2015 Pine Mizune |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4840
59