amznjp-url-normalize
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -35,4 +35,7 @@ /*jslint node: true */ | ||
// 既に正規化済みの URL にアクセスした場合、Location ヘッダが付かない | ||
// そのため、Location ヘッダがない場合は元の URL を流用 | ||
var location = res.headers.location || url; | ||
var re = /dp\/(\w+)/; | ||
var location = res.headers.location || ''; | ||
var matches = location.match(re); | ||
@@ -39,0 +42,0 @@ |
{ | ||
"name": "amznjp-url-normalize", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Normalize URL of Amazon.co.jp", | ||
@@ -13,3 +13,3 @@ "main": "index.js", | ||
"scripts": { | ||
"test": "mocha -R spec -t 5000 test/**/*.js" | ||
"test": "gulp" | ||
}, | ||
@@ -32,4 +32,10 @@ "author": { | ||
"chai": "^2.0.0", | ||
"mocha": "^2.1.0" | ||
"coffee-script": "^1.9.0", | ||
"gulp": "^3.8.11", | ||
"gulp-cli": "^0.1.5", | ||
"gulp-coveralls": "^0.1.3", | ||
"gulp-istanbul": "^0.6.0", | ||
"gulp-mocha": "^2.0.0", | ||
"gulp-plumber": "^0.6.6" | ||
} | ||
} |
@@ -5,2 +5,3 @@ amznjp-url-normalize | ||
[![Build Status](https://travis-ci.org/pine613/amznjp-url-normalize.svg?branch=master)](https://travis-ci.org/pine613/amznjp-url-normalize) | ||
[![Coverage Status](https://coveralls.io/repos/pine613/amznjp-url-normalize/badge.svg?branch=master)](https://coveralls.io/r/pine613/amznjp-url-normalize?branch=master) | ||
[![Dependency Status](https://david-dm.org/pine613/amznjp-url-normalize.svg)](https://david-dm.org/pine613/amznjp-url-normalize) | ||
@@ -7,0 +8,0 @@ [![devDependency Status](https://david-dm.org/pine613/amznjp-url-normalize/dev-status.svg)](https://david-dm.org/pine613/amznjp-url-normalize#info=devDependencies) |
5346
41
60
8