Skip to content

Commit

Permalink
remove querystring package; its not even used :/
Browse files Browse the repository at this point in the history
  • Loading branch information
bttmly committed Apr 2, 2018
1 parent ba5d9d1 commit 5e131c5
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 10 deletions.
7 changes: 4 additions & 3 deletions .eslintrc → .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
module.exports = {
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true,
"es6": true,
"mocha": true
"mocha": true,
},
"rules": {
"quotes": [ 2 ],
Expand All @@ -17,5 +17,6 @@
"no-dupe-keys": 2,
"no-duplicate-case": 2,
"no-func-assign": 2,
"no-unused-vars": 2,
},
}
};
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ browser-test:
test: build
./node_modules/.bin/mocha --recursive --timeout 60000 ./test/setup.js ./test/unit ./test/integration

test-bail: build
./node_modules/.bin/mocha --bail --recursive --timeout 60000 ./test/setup.js ./test/unit ./test/integration

test-integration: build
./node_modules/.bin/mocha --recursive --timeout 60000 ./test/setup.js ./test/integration

Expand Down
2 changes: 1 addition & 1 deletion scripts/proxy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const http = require("http");
const qs = require("querystring");
const qs = require("qs");

const nba = require("..");

Expand Down
1 change: 0 additions & 1 deletion src/get-json.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const url = require("url");
const qs = require("querystring");
const template = require("nba-client-template");

const HEADERS = {
Expand Down
2 changes: 1 addition & 1 deletion src/sport-vu.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const {general} = require("./transforms");
const endpoints = require("./sport-vu-endpoints");
const getJson = require("./get-json");

function getTransform (endpoint) { return general; }
function getTransform () { return general; }

function makeSportVuMethod (endpoint, transport) {
const makeUrl = interpolate(endpoint.url);
Expand Down
3 changes: 1 addition & 2 deletions src/stats.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const qs = require("querystring");
const debug = require("debug")("nba");
const template = require("nba-client-template");
const camelCase = require("camel-case");
Expand Down Expand Up @@ -49,7 +48,7 @@ function makeStatsMethod (endpoint, transport) {
// throw new Error(`No transform found for ${ccName}`);
// }

function statsMethod (query = {}, options = {}) {
function statsMethod (query = {}) {
const reqParams = Object.assign({}, defaults, query);

debug("stats request", endpoint.url, reqParams);
Expand Down
2 changes: 1 addition & 1 deletion src/synergy.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ parameters.forEach(function (param) {
});

function makeSynergyMethod (endpoint, transport) {
function synergyMethod (query = {}, options = {}) {
function synergyMethod (query = {}) {
const reqParams = Object.assign({}, defaults, query);
return transport(endpoint.url, reqParams)
.then(function (response) {
Expand Down
2 changes: 1 addition & 1 deletion src/transforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ function sportVu (resp) {
return indexBy(temp[0], "playerId");
}

module.exports = { base, general, players, lineups };
module.exports = { base, general, players, lineups, sportVu };

0 comments on commit 5e131c5

Please sign in to comment.