Comparing version 1.0.2 to 1.0.3
@@ -10,3 +10,3 @@ 'use strict'; | ||
if (typeof opts !== 'object') { | ||
if (typeof opts === 'function') { | ||
cb = opts; | ||
@@ -16,7 +16,6 @@ opts = {}; | ||
cb = cb || function () {}; | ||
opts = objectAssign({json: true}, opts); | ||
opts.headers = objectAssign({ | ||
'accept': 'application/vnd.github.v3+json', | ||
accept: 'application/vnd.github.v3+json', | ||
'user-agent': 'https://github.com/sindresorhus/gh-got' | ||
@@ -29,3 +28,3 @@ }, opts.headers); | ||
if (token) { | ||
opts.headers['authorization'] = 'token ' + token; | ||
opts.headers.authorization = 'token ' + token; | ||
} | ||
@@ -42,3 +41,3 @@ | ||
return got(url, opts, cb); | ||
}; | ||
} | ||
@@ -45,0 +44,0 @@ [ |
{ | ||
"name": "gh-got", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Convenience wrapper for `got` to interact with the GitHub API", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
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
4334
42