Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

steamapi

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

steamapi - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

49

package.json

@@ -1,8 +0,7 @@

{
"author": "lloti <dimggyt@gmail.com> (https://dim.codes)",
"name": "steamapi",
"description": "A nice Steam API wrapper.",
"main": "index.js",
"version": "2.0.0",
"author": "lloti <dimggyt@gmail.com> (https://dim.codes)",
"name": "steamapi",
"description": "A nice Steam API wrapper.",
"main": "index.js",
"version": "2.0.1",
"license": "MIT",

@@ -12,20 +11,20 @@ "eslintConfig": {

},
"keywords": [
"steam",
"api",
"wrapper",
"steam-api",
"steampowered"
],
"bugs": {
"web": "https://github.com/lloti/node-steamapi/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/lloti/node-steamapi"
},
"homepage": "https://github.com/lloti/node-steamapi#readme",
"devDependencies": {
"eslint-config-lloti": "github:lloti/eslint-config-lloti"
}
}
"keywords": [
"steam",
"api",
"wrapper",
"steam-api",
"steampowered"
],
"bugs": {
"web": "https://github.com/lloti/node-steamapi/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/lloti/node-steamapi"
},
"homepage": "https://github.com/lloti/node-steamapi#readme",
"devDependencies": {
"eslint-config-lloti": "github:lloti/eslint-config-lloti"
}
}

@@ -9,4 +9,7 @@ const Player = require('./Player');

this.game = player.gameName;
this.stats = objectify(player.stats);
this.achievements = objectify(player.achievements, 'achieved');
console.log(player);
if (player.stats)
this.stats = objectify(player.stats);
if (player.achievements)
this.achievements = objectify(player.achievements, 'achieved');
}

@@ -13,0 +16,0 @@ }

@@ -5,2 +5,3 @@ const { createDeflate, createGunzip } = require('zlib');

const http = require('http');
const reg = /<h1>(.*)<\/h1>/;

@@ -24,3 +25,3 @@ module.exports = (url, { headers } = {}) => {

op.on('data', chunk => data += String(chunk));
op.on('data', chunk => data += chunk);
op.once('errror', reject);

@@ -30,3 +31,3 @@ op.once('end', () => {

if (res.statusCode === 403) return reject(new Error('Invalid key'));
if (res.statusCode === 400) return reject(new Error(data.match(/<h1>(.*)<\/h1>/)[1]));
if (res.statusCode === 400) return reject(new Error(reg.test(data) ? data.match(reg)[1] : data));
if (res.statusCode !== 200) return reject(new Error(res.statusMessage));

@@ -33,0 +34,0 @@ try {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc