mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-01-10 02:10:20 +08:00
14 lines
303 B
JavaScript
14 lines
303 B
JavaScript
exports.isSteamID = function(input) {
|
|
var keys = Object.keys(input);
|
|
if (keys.length != 4) {
|
|
return false;
|
|
}
|
|
|
|
// Make sure it has the keys we expect
|
|
keys = keys.filter(function(item) {
|
|
return ['universe', 'type', 'instance', 'accountid'].indexOf(item) != -1;
|
|
});
|
|
|
|
return keys.length == 4;
|
|
};
|