browser-language
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -0,1 +1,11 @@ | ||
v1.2.0 / 2014-07-27 | ||
================== | ||
* Test "node": ">=0.10.0" only | ||
* Using task runner `grunt` | ||
* Using test framework `mocha` | ||
* Testing script will be put inside "test/" | ||
* ".npmignore" more aggressive | ||
* `uglify` compiles | ||
v1.1.0 / 2014-07-25 | ||
@@ -2,0 +12,0 @@ ================== |
{ | ||
"name": "browser-language", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "grab browser language and store on cookie", | ||
"main": "index.js", | ||
"main": "index.min.js", | ||
"repository": { | ||
@@ -18,10 +18,21 @@ "type": "git", | ||
}, | ||
"dependencies": {}, | ||
"dependencies": { | ||
}, | ||
"devDependencies": { | ||
"cookie-parser": "1.3.X", | ||
"express": "4.6.X" | ||
"cookie-parser": "~1.3.2", | ||
"express": "~4.7.1", | ||
"mocha": "~1.21.0", | ||
"grunt": "~0.4.5", | ||
"grunt-contrib-clean": "~0.5.0", | ||
"grunt-contrib-uglify": "0.5.0", | ||
"load-grunt-tasks": "~0.6.0", | ||
"supertest": "~0.13.0" | ||
}, | ||
"engines": { | ||
"node": ">0.8.0" | ||
"node": ">=0.10.0" | ||
}, | ||
"scripts": { | ||
"prepublish": "npm prune", | ||
"test": "mocha --bail --check-leaks test/" | ||
}, | ||
"keywords": [ | ||
@@ -35,2 +46,2 @@ "browser", | ||
"homepage": "https://github.com/hex7c0/browser-language" | ||
} | ||
} |
@@ -1,4 +0,8 @@ | ||
#browser-language [![Build Status](https://travis-ci.org/hex7c0/browser-language.svg?branch=master)](https://travis-ci.org/hex7c0/browser-language) [![NPM version](https://badge.fury.io/js/browser-language.svg)](http://badge.fury.io/js/browser-language) | ||
# [browser-language](https://github.com/hex7c0/browser-language) | ||
[![NPM version](https://badge.fury.io/js/browser-language.svg)](http://badge.fury.io/js/browser-language) | ||
[![Build Status](https://travis-ci.org/hex7c0/browser-language.svg?branch=master)](https://travis-ci.org/hex7c0/browser-language) | ||
[![devDependency Status](https://david-dm.org/hex7c0/browser-language/dev-status.svg)](https://david-dm.org/hex7c0/browser-language#info=devDependencies) | ||
grab browser language and store on cookie for [nodejs](http://nodejs.org) | ||
Grab browser language and store min value on cookie for [nodejs](http://nodejs.org). | ||
If `browser['Accept-Language'] = it-IT,it;q=0.8,en-US;q=0.6,en;q=0.4`, store `it` on cookie, otherwise, if language is not available, store default language `en` | ||
@@ -24,11 +28,4 @@ ## Installation | ||
app.use(language({ | ||
dictionary: { | ||
_default: 'en', | ||
en: 'en', | ||
}, | ||
cookie: 'new_cookie_name', | ||
})); | ||
app.use(language()); | ||
``` | ||
_Signed_ use inside expressjs project | ||
@@ -44,6 +41,6 @@ ```js | ||
_default: 'en', | ||
en: 'en', | ||
en: 'en' | ||
}, | ||
cookie: 'new_cookie_name', | ||
signed: true, | ||
signed: true | ||
})); | ||
@@ -54,3 +51,3 @@ ``` | ||
#### Options | ||
#### options | ||
@@ -70,3 +67,3 @@ - `dictionary` - **Object** Accepted language | ||
`dictionary` object with correct value to be added, otherwise using a default dictionary inside ./lib/dictionary.js | ||
`dictionary` object with correct value to be added, otherwise using a default dictionary inside *./lib/dictionary.js* | ||
@@ -73,0 +70,0 @@ #### Examples |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
43572
8
7
10
1
74
2