vk-universal-api
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -13,28 +13,18 @@ 'use strict'; | ||
function VkUniversalApi() { | ||
var _this = this; | ||
_universalApi2['default'].call(this, { | ||
baseUrl: 'https://api.vk.com/method/', | ||
jsonp: true, | ||
query: function query() { | ||
return { access_token: _this.token }; | ||
}, | ||
transformResponse: function transformResponse(response) { | ||
if (response.response) { | ||
return response.response; | ||
} else { | ||
throw response.error; | ||
} | ||
exports['default'] = new _universalApi2['default']({ | ||
baseUrl: 'https://api.vk.com/method/', | ||
jsonp: true, | ||
query: function query() { | ||
return { | ||
access_token: this.token | ||
}; | ||
}, | ||
transformResponse: function transformResponse(response) { | ||
if (response.response) { | ||
return response.response; | ||
} else { | ||
throw response.error; | ||
} | ||
}); | ||
}; | ||
VkUniversalApi.prototype = Object.create(_universalApi2['default'].prototype); | ||
VkUniversalApi.prototype.setToken = function (token) { | ||
this.token = token; | ||
}; | ||
exports['default'] = new VkUniversalApi(); | ||
} | ||
}); | ||
module.exports = exports['default']; |
{ | ||
"name": "vk-universal-api", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "vk-universal-api", | ||
"main": "dist/index.js", | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"start": "node cli.js", | ||
"test": "mocha --require babel/register", | ||
"test:watch": "mocha -w --require babel/register", | ||
"test": "npm run test:node && npm run karma", | ||
"test:node": "mocha --require babel/register test/api-spec", | ||
"test:node:watch": "mocha -w --require babel/register test/api-spec", | ||
"prebuild": "rm -rf dist && mkdir dist", | ||
"build": "babel -d dist/ src/", | ||
"prepublish": "npm run build" | ||
"prepublish": "npm run build", | ||
"test:webpack:build": "webpack --config test/fixtures/webpack.config.js", | ||
"test:browserify:build": "browserify test/fixtures/index.js > test/fixtures/bundles/app.browserify.bundle.js", | ||
"karma:webpack": "karma start karma.webpack.conf.js", | ||
"karma:browserify": "karma start karma.browserify.conf.js", | ||
"karma": "npm run karma:webpack && npm run karma:browserify" | ||
}, | ||
"preferGlobal": "false", | ||
"repository": { | ||
@@ -27,9 +35,19 @@ "type": "git", | ||
"dependencies": { | ||
"universal-api": "^0.1.0" | ||
"universal-api": "^0.1.1" | ||
}, | ||
"devDependencies": { | ||
"babel": "^5.8.21", | ||
"babel-loader": "^5.4.0", | ||
"browserify": "^13.0.0", | ||
"chai": "^3.2.0", | ||
"mocha": "^2.2.5" | ||
"karma": "^0.13.19", | ||
"karma-env-preprocessor": "^0.1.1", | ||
"karma-mocha": "^0.2.1", | ||
"karma-phantomjs-launcher": "^1.0.0", | ||
"karma-webpack": "^1.7.0", | ||
"mocha": "^2.2.5", | ||
"phantomjs": "^2.1.3", | ||
"phantomjs-prebuilt": "^2.1.3", | ||
"webpack": "^1.12.12" | ||
} | ||
} |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
0
2793
13
3
23
Updateduniversal-api@^0.1.1