Skip to content

Commit

Permalink
0.0.2 Add {gzip:true} for requset
Browse files Browse the repository at this point in the history
  • Loading branch information
59naga committed Feb 12, 2016
1 parent e26e32b commit 9bdd284
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion README.md
Expand Up @@ -4,6 +4,8 @@

Fetch the [npm/download-counts](https://github.com/npm/download-counts#data-source).

[DEMO](https://github.com/59naga/npm.berabou.me)

## Installation

### Via npm
Expand All @@ -29,7 +31,7 @@ $ bower install npm-count --save
### Via rawgit.com(the simple way)

```html
<script src="https://cdn.rawgit.com/59naga/npm-count/v0.0.1/npm-count.min.js"></script>
<script src="https://cdn.rawgit.com/59naga/npm-count/v0.0.2/npm-count.min.js"></script>
<script>
console.log(npmCount); //object
</script>
Expand Down
2 changes: 1 addition & 1 deletion npm-count.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion npm-count.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
@@ -1,9 +1,9 @@
{
"name": "npm-count",
"version": "0.0.1",
"version": "0.0.2",
"description": "Fetch the npm/download-counts",

"main": "lib/index.js",
"main": "lib",
"browser": {
"request": false
},
Expand Down
2 changes: 1 addition & 1 deletion src/utility.coffee
Expand Up @@ -74,7 +74,7 @@ class Utility
for uri in uris
do (uri)->
new Promise (resolve,reject)->
request uri,(error,response)->
request uri,{gzip:yes},(error,response)->
return reject error if error
return reject JSON.parse(response.body).error if response.body.slice(0,9) is '{"error":'
return resolve response.body
Expand Down

0 comments on commit 9bdd284

Please sign in to comment.