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

kindred-api

Package Overview
Dependencies
Maintainers
1
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kindred-api - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

39

dist/kindred-api.js

@@ -209,3 +209,3 @@ (function (global, factory) {

var mid = staticReq ? '' : region + '/';
var prefix = !status && !observerMode && !championMastery ? 'api/lol/' + mid : observerMode || championMastery ? '' : 'lol/status/';
var prefix = !status && !observerMode && !championMastery ? 'api/lol/' + mid : '';

@@ -370,29 +370,34 @@ return 'https://' + region + '.api.riotgames.com/' + prefix + encodeURI(query) + '?api_key=' + this.key;

}, {
key: '_gameRequest',
value: function _gameRequest(_ref8, cb) {
key: '_statusRequest',
value: function _statusRequest(_ref8, cb) {
var endUrl = _ref8.endUrl,
region = _ref8.region;
region = _ref8.region,
options = _ref8.options;
return this._baseRequest({
endUrl: 'v' + versions.GAME + '/game/' + endUrl, region: region
endUrl: 'lol/status/v' + versions.STATUS + '/' + endUrl,
status: true,
options: options
}, cb);
}
}, {
key: '_leagueRequest',
value: function _leagueRequest(_ref9, cb) {
key: '_gameRequest',
value: function _gameRequest(_ref9, cb) {
var endUrl = _ref9.endUrl,
region = _ref9.region,
options = _ref9.options;
region = _ref9.region;
return this._baseRequest({
endUrl: 'v' + versions.LEAGUE + '/league/' + endUrl, region: region, options: options
endUrl: 'v' + versions.GAME + '/game/' + endUrl, region: region
}, cb);
}
}, {
key: '_staticRequest',
value: function _staticRequest(_ref10, cb) {
key: '_leagueRequest',
value: function _leagueRequest(_ref10, cb) {
var endUrl = _ref10.endUrl,
region = _ref10.region;
region = _ref10.region,
options = _ref10.options;
return this._baseRequest({ endUrl: 'v' + versions.STATUS + '/' + endUrl, region: region, status: true }, cb);
return this._baseRequest({
endUrl: 'v' + versions.LEAGUE + '/league/' + endUrl, region: region, options: options
}, cb);
}

@@ -890,3 +895,3 @@ }, {

if (Number.isInteger(id || championID)) {
this._staticRequest({ endUrl: 'champion/' + (id || championID), region: region, options: options }, cb);
return this._staticRequest({ endUrl: 'champion/' + (id || championID), region: region, options: options }, cb);
} else {

@@ -1076,3 +1081,3 @@ return this._logError(this.getChampion.name, 'required params ' + chalk.yellow('`id/championID` (int)') + ' not passed in');

return this._staticRequest({ endUrl: 'shard', region: region }, cb = region ? cb : arguments[0]);
return this._statusRequest({ endUrl: 'shard', region: region }, cb = region ? cb : arguments[0]);
}

@@ -1087,3 +1092,3 @@ }, {

return this._staticRequest({ endUrl: 'shards', region: region }, cb = region ? cb : arguments[0]);
return this._statusRequest({ endUrl: 'shards', region: region }, cb = region ? cb : arguments[0]);
}

@@ -1090,0 +1095,0 @@ }, {

@@ -1,1 +0,1 @@

!function(e,t){if("function"==typeof define&&define.amd)define("kindred-api",["module","double-ended-queue","request","chalk","xregexp"],t);else if("undefined"!=typeof exports)t(module,require("double-ended-queue"),require("request"),require("chalk"),require("xregexp"));else{var r={exports:{}};t(r,e.doubleEndedQueue,e.request,e.chalk,e.xregexp),e.kindredApi=r.exports}}(this,function(e,t,r,n,i){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(){function e(r,n){o(this,e),this.allowedRequests=r,this.seconds=n,this.madeRequests=new t}return a(e,[{key:"__reload",value:function(){for(var e=(new Date).getTime();this.madeRequests.length>0&&e-this.madeRequests.peekFront()>=1e3*this.seconds;)this.madeRequests.shift()}},{key:"addRequest",value:function(){this.madeRequests.push((new Date).getTime()+(1e3*this.seconds+1e3*this.seconds/75))}},{key:"requestAvailable",value:function(){return this.__reload(),this.madeRequests.length<this.allowedRequests}}]),e}(),l={BRAZIL:"BR1",EUROPE:"EUN1",EUROPE_WEST:"EUW1",KOREA:"KR",LATIN_AMERICA_NORTH:"LA1",LATIN_AMERICA_SOUTH:"LA2",NORTH_AMERICA:"NA1",OCEANIA:"OC1",RUSSIA:"RU",TURKEY:"TR1",JAPAN:"JP1"},m={BRAZIL:"br",EUROPE:"eune",EUROPE_WEST:"euw",KOREA:"kr",LATIN_AMERICA_NORTH:"lan",LATIN_AMERICA_SOUTH:"las",NORTH_AMERICA:"na",OCEANIA:"oce",RUSSIA:"ru",TURKEY:"tr",JAPAN:"jp"},g={br:"BRAZIL",eune:"EUROPE",euw:"EUROPE_WEST",kr:"KOREA",lan:"LATIN_AMERICA_NORTH",las:"LATIN_AMERICA_SOUTH",na:"NORTH_AMERICA",oce:"OCEANIA",ru:"RUSSIA",tr:"TURKEY",jp:"JAPAN"},d={CHAMPION:1.2,CURRENT_GAME:1,FEATURED_GAMES:1,GAME:1.3,LEAGUE:2.5,STATIC_DATA:1.2,STATUS:1,MATCH:2.2,MATCH_LIST:2.2,RUNES_MASTERIES:1.4,STATS:1.3,SUMMONER:1.4},h={int:function(e){return e.every(function(e){return Number.isInteger(e)})},string:function(e){return e.every(function(e){return"string"==typeof e})}},p={int:function(e){return e&&Array.isArray(e)&&h.int(e)&&e.length>0},string:function(e){return e&&Array.isArray(e)&&h.string(e)&&e.length>0}},y=i("^[0-9\\p{L} _\\.]+$"),c=function(){function e(t){var r=t.key,n=t.defaultRegion,i=void 0===n?m.NORTH_AMERICA:n,s=t.debug,a=void 0!==s&&s,l=t.limits;o(this,e),this.key=r,this.defaultRegion=i,this.debug=a,l&&(this.limits=[new u(l[0][0],l[0][1]),new u(l[1][0],l[1][1])])}return a(e,[{key:"canMakeRequest",value:function(){return!(!this.limits[0].requestAvailable()||!this.limits[1].requestAvailable())}},{key:"_sanitizeName",value:function(e){if(this._validName(e))return e.replace(/\s/g,"").toLowerCase();this._logError(this._validName.name,"Name "+n.yellow(e)+" is not valid. Request failed."),process.exit(1)}},{key:"_validName",value:function(e){return y.test(e)}},{key:"_makeUrl",value:function(e,t,r,n,i,o){var s=r?"":t+"/";return"https://"+t+".api.riotgames.com/"+(n||i||o?i||o?"":"lol/status/":"api/lol/"+s)+encodeURI(e)+"?api_key="+this.key}},{key:"_baseRequest",value:function(e,t){var i=this,o=e.endUrl,s=e.region,a=void 0===s?this.defaultRegion:s,u=e.status,l=void 0!==u&&u,m=e.observerMode,g=void 0!==m&&m,d=e.staticReq,h=void 0!==d&&d,p=e.championMastery,y=void 0!==p&&p,c=e.options,v=void 0===c?{}:c,f=h?"global":a,R=this._makeUrl(o,f,h,l,g,y);if(!t)return void console.log(n.red("error: No callback passed in for the method call regarding `"+n.yellow(R)+"`"));this.limits?function e(){var i=this;this.canMakeRequest()?(h||(this.limits[0].addRequest(),this.limits[1].addRequest()),r({url:R,qs:v},function(r,o,s){var a=void 0,u=o.statusCode;return u>=200&&u<300?a=n.green(u):u>=400&&u<500?a=n.red(u):u>=500&&(a=n.bold.red(u)),i.debug&&(console.log(o&&a,R),console.log({"x-app-rate-limit-count":o.headers["x-app-rate-limit-count"],"x-method-rate-limit-count":o.headers["x-method-rate-limit-count"],"x-rate-limit-count":o.headers["x-rate-limit-count"],"retry-after":o.headers["retry-after"]}),console.log()),u>=500&&i.limits&&(i.debug&&console.log("!!! resending request !!!"),setTimeout(e.bind(i),1e3)),429===u&&i.limits&&(i.debug&&console.log("!!! resending request !!!"),setTimeout(e.bind(i),1e3*o.headers["retry-after"]+50)),u>=400?t(o&&a):t(r,JSON.parse(s))})):setTimeout(e.bind(this),1e3)}.bind(this)(R,v):r({url:R,qs:v},function(e,r,o){var s=void 0,a=r.statusCode;return a>=200&&a<300?s=n.green(a):a>=400&&a<500?s=n.red(a):a>=500&&(s=n.bold.red(a)),i.debug&&(console.log(r&&s,R),console.log({"x-app-rate-limit-count":r.headers["x-app-rate-limit-count"],"x-method-rate-limit-count":r.headers["x-method-rate-limit-count"],"x-rate-limit-count":r.headers["x-rate-limit-count"],"retry-after":r.headers["retry-after"]})),a>=400?t(r&&s):t(e,JSON.parse(o))})}},{key:"_observerRequest",value:function(e,t){var r=e.endUrl,n=e.region;return this._baseRequest({endUrl:"observer-mode/rest/"+r,observerMode:!0,region:n},t)}},{key:"_championRequest",value:function(e,t){var r=e.endUrl,n=e.region,i=e.options;return this._baseRequest({endUrl:"v"+d.CHAMPION+"/"+r,region:n,options:i},t)}},{key:"_championMasteryRequest",value:function(e,t){var r=e.endUrl,n=(e.region,e.options);return this._baseRequest({endUrl:"championmastery/location/"+r,options:n,championMastery:!0},t)}},{key:"_currentGameRequest",value:function(e,t){var r=e.endUrl,n=e.region,i=e.platformId;return this._observerRequest({endUrl:"consumer/getSpectatorGameInfo/"+i+"/"+r,region:n},t)}},{key:"_staticRequest",value:function(e,t){var r=e.endUrl,n=e.region,i=void 0===n?this.defaultRegion:n,o=e.options;return this._baseRequest({endUrl:"static-data/"+i+"/v"+d.STATIC_DATA+"/"+r,staticReq:!0,region:i,options:o},t)}},{key:"_gameRequest",value:function(e,t){var r=e.endUrl,n=e.region;return this._baseRequest({endUrl:"v"+d.GAME+"/game/"+r,region:n},t)}},{key:"_leagueRequest",value:function(e,t){var r=e.endUrl,n=e.region,i=e.options;return this._baseRequest({endUrl:"v"+d.LEAGUE+"/league/"+r,region:n,options:i},t)}},{key:"_staticRequest",value:function(e,t){var r=e.endUrl,n=e.region;return this._baseRequest({endUrl:"v"+d.STATUS+"/"+r,region:n,status:!0},t)}},{key:"_matchRequest",value:function(e,t){var r=e.endUrl,n=e.region,i=e.options;return this._baseRequest({endUrl:"v"+d.MATCH+"/match/"+r,region:n,options:i},t)}},{key:"_matchListRequest",value:function(e,t){var r=e.endUrl,n=e.region,i=e.options;return this._baseRequest({endUrl:"v"+d.MATCH_LIST+"/matchlist/by-summoner/"+r,region:n,options:i},t)}},{key:"_runesMasteriesRequest",value:function(e,t){var r=e.endUrl,n=e.region;return this._summonerRequest({endUrl:r,region:n},t)}},{key:"_statsRequest",value:function(e,t){var r=e.endUrl,n=e.region,i=e.options;return this._baseRequest({endUrl:"v"+d.STATS+"/stats/by-summoner/"+r,region:n,options:i},t)}},{key:"_summonerRequest",value:function(e,t){var r=e.endUrl,n=e.region;return this._baseRequest({endUrl:"v"+d.SUMMONER+"/summoner/"+r,region:n},t)}},{key:"_logError",value:function(e,t){console.log(n.bold.yellow(e),n.red("request"),n.bold.red("FAILED")+n.red("; "+t))}},{key:"setRegion",value:function(e){this.defaultRegion=e}},{key:"getChamps",value:function(e,t){var r=e.region,n=e.options;return this._championRequest({endUrl:"champion",region:r,options:n},t=r||n?t:arguments[0])}},{key:"getChamp",value:function(e,t){var r=e.region,i=e.id,o=e.championID;return Number.isInteger(i)||Number.isInteger(o)?this._championRequest({endUrl:"champion/"+(i||o),region:r}):this._logError(this.getChamp.name,"required params "+n.yellow("`id/championID` (int)")+" not passed in")}},{key:"getChampMastery",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=void 0===t?this.defaultRegion:t,i=e.playerID,o=e.championID,s=e.options,a=arguments[1];if(Number.isInteger(i)&&Number.isInteger(o)){var u=l[g[r]];return this._championMasteryRequest({endUrl:u+"/player/"+i+"/champion/"+o,region:r,options:s},a)}return this._logError(this.getChampMastery.name,"required params "+n.yellow("`playerID` (int) AND `championID` (int)")+" not passed in")}},{key:"getChampMasteries",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=void 0===r?this.defaultRegion:r,o=t.id,a=t.summonerID,u=t.playerID,m=t.name,d=t.options,h=arguments[1];if(Number.isInteger(o||a||u)){var p=l[g[i]];return this._championMasteryRequest({endUrl:p+"/player/"+(o||a||u)+"/champions",region:i,options:d},h)}if("object"===s(arguments[0])&&"string"==typeof m){var y=l[g[i]];return this.getSummoner({name:m,region:i},function(t,r){return t?h(t):e._championMasteryRequest({endUrl:y+"/player/"+r[e._sanitizeName(m)].id+"/champions",region:i},h)})}return this._logError(this.getChampMasteries.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (str)")+" not passed in")}},{key:"getTotalChampMasteryScore",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=void 0===r?this.defaultRegion:r,o=t.id,a=t.summonerID,u=t.playerID,m=t.name,d=t.options,h=arguments[1];if(Number.isInteger(o||a||u)){var p=l[g[i]];return this._championMasteryRequest({endUrl:p+"/player/"+(o||a||u)+"/score",region:i,options:d},h)}if("object"===s(arguments[0])&&"string"==typeof m){var y=l[g[i]];return this.getSummoner({name:m,region:i},function(t,r){return t?h(t):e._championMasteryRequest({endUrl:y+"/player/"+r[e._sanitizeName(m)].id+"/score",region:i},h)})}return this._logError(this.getTotalChampMasteryScore.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (str)")+" not passed in")}},{key:"getTopChamps",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=void 0===r?this.defaultRegion:r,o=t.id,a=t.summonerID,u=t.playerID,m=t.name,d=t.options,h=arguments[1];if(Number.isInteger(o||a||u)){var p=l[g[i]];return this._championMasteryRequest({endUrl:p+"/player/"+(o||a||u)+"/topchampions",region:i,options:d},h)}if("object"===s(arguments[0])&&"string"==typeof m){var y=l[g[i]];return this.getSummoner({name:m,region:i},function(t,r){return t?h(t):e._championMasteryRequest({endUrl:y+"/player/"+r[e._sanitizeName(m)].id+"/topchampions",region:i},h)})}return this._logError(this.getTopChamps.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (str)")+" not passed in")}},{key:"getCurrentGame",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=void 0===r?this.defaultRegion:r,o=t.id,a=t.summonerID,u=t.playerID,m=t.name,d=arguments[1],h=l[g[i]];return Number.isInteger(o||a||u)?this._currentGameRequest({endUrl:""+(o||a||u),platformId:h,region:i},d):"object"===s(arguments[0])&&"string"==typeof m?this.getSummoner({name:m,region:i},function(t,r){return t?d(t):e._currentGameRequest({endUrl:""+r[e._sanitizeName(m)].id,platformId:h,region:i},d)}):this._logError(this.getCurrentGame.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (string)")+" not passed in")}},{key:"getFeaturedGames",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=arguments[1];return this._observerRequest({endUrl:"featured",region:t},r=t?r:arguments[0])}},{key:"getRecentGames",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.id,o=t.summonerID,a=t.playerID,u=t.name,l=arguments[1];return Number.isInteger(i||o||a)?this._gameRequest({endUrl:"by-summoner/"+(i||o||a)+"/recent",region:r},l):"object"===s(arguments[0])&&"string"==typeof u?this.getSummoner({name:u,region:r},function(t,n){return t?l(t):e._gameRequest({endUrl:"by-summoner/"+n[e._sanitizeName(u)].id+"/recent",region:r},l)}):this._logError(this.getRecentGames.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (string)")+" not passed in")}},{key:"getLeagues",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.ids,o=t.id,a=t.summonerIDs,u=t.summonerID,l=t.playerIDs,m=t.playerID,g=t.names,d=t.name,h=arguments[1];return p.int(i||a||l)?this._leagueRequest({endUrl:"by-summoner/"+(i||a||l).join(","),region:r},h):Number.isInteger(i||o||a||u||l||m)?this._leagueRequest({endUrl:"by-summoner/"+(i||o||a||u||l||m),region:r},h):p.string(g)?this.getSummoners({names:g,region:r},function(t,n){if(t)return h(t);var i=[],o=!0,s=!1,a=void 0;try{for(var u,l=g[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var m=u.value;i.push(n[e._sanitizeName(m)].id)}}catch(e){s=!0,a=e}finally{try{!o&&l.return&&l.return()}finally{if(s)throw a}}return e._leagueRequest({endUrl:"by-summoner/"+i.join(","),region:r},h)}):"object"!==s(arguments[0])||"string"!=typeof g&&"string"!=typeof d?this._logError(this.getLeagues.name,"required params "+n.yellow("`ids/summonerIDs/playerIDs` ([int]/int)")+", "+n.yellow("`id/summonerID/playerID` (int)")+", "+n.yellow("`names` ([str]/str)")+", or "+n.yellow("`name` (str)")+" not passed in"):this.getSummoner({name:g||d,region:r},function(t,n){return t?h(t):e._leagueRequest({endUrl:"by-summoner/"+n[e._sanitizeName(g||d)].id,region:r},h)})}},{key:"getLeagueEntries",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.ids,o=t.id,a=t.summonerIDs,u=t.summonerID,l=t.playerIDs,m=t.playerID,g=t.names,d=t.name,h=arguments[1];return p.int(i||a||l)?this._leagueRequest({endUrl:"by-summoner/"+(i||a||l).join(",")+"/entry",region:r},h):Number.isInteger(i||o||a||u||l||m)?this._leagueRequest({endUrl:"by-summoner/"+(i||o||a||u||l||m)+"/entry",region:r},h):p.string(g)?this.getSummoners({names:g,region:r},function(t,n){if(t)return h(t);var i=[],o=!0,s=!1,a=void 0;try{for(var u,l=g[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var m=u.value;i.push(n[e._sanitizeName(m)].id)}}catch(e){s=!0,a=e}finally{try{!o&&l.return&&l.return()}finally{if(s)throw a}}return e._leagueRequest({endUrl:"by-summoner/"+i.join(",")+"/entry",region:r},h)}):"object"!==s(arguments[0])||"string"!=typeof g&&"string"!=typeof d?void this._logError(this.getLeagueEntries.name,"required params "+n.yellow("`ids/summonerIDs/playerIDs` ([int]/int)")+", "+n.yellow("`id/summonerID/playerID` (int)")+", "+n.yellow("`names` ([str]/str)")+", or "+n.yellow("`name` (str)")+" not passed in"):this.getSummoner({name:g||d,region:r},function(t,n){return t?h(t):e._leagueRequest({endUrl:"by-summoner/"+n[e._sanitizeName(g||d)].id+"/entry",region:r},h)})}},{key:"getChallengers",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=void 0===r?{type:"RANKED_SOLO_5x5"}:r,i=arguments[1];return this._leagueRequest({endUrl:"challenger",region:t,options:n},i=t?i:arguments[0])}},{key:"getMasters",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=void 0===r?{type:"RANKED_SOLO_5x5"}:r,i=arguments[1];return this._leagueRequest({endUrl:"master",region:t,options:n},i=t?i:arguments[0])}},{key:"getChampionList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"champion",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getChampion",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.championID,o=e.options,s=arguments[1];if(!Number.isInteger(r||i))return this._logError(this.getChampion.name,"required params "+n.yellow("`id/championID` (int)")+" not passed in");this._staticRequest({endUrl:"champion/"+(r||i),region:t,options:o},s)}},{key:"getItems",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"item",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getItem",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.itemID,o=e.options,s=arguments[1];return Number.isInteger(r||i)?this._staticRequest({endUrl:"item/"+(r||i),region:t,options:o},s):this._logError(this.getItem.name,"required params "+n.yellow("`id/itemID` (int)")+" not passed in")}},{key:"getLanguageStrings",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"language-strings",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getLanguages",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=arguments[1];return this._staticRequest({endUrl:"languages",region:t},r=t?r:arguments[0])}},{key:"getMap",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"map",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getMasteryList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"mastery",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getMastery",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.masteryID,o=e.options,s=arguments[1];return Number.isInteger(r||i)?this._staticRequest({endUrl:"mastery/"+(r||i),region:t,options:o},s):this._logError(this.getMastery.name,"required params "+n.yellow("`id/masteryID` (int)")+" not passed in")}},{key:"getRealmData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=arguments[1];return this._staticRequest({endUrl:"realm",region:t},r=t?r:arguments[0])}},{key:"getRuneList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"rune",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getRune",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.runeID,o=e.options,s=arguments[1];return Number.isInteger(r||i)?this._staticRequest({endUrl:"rune/"+(r||i),region:t,options:o},s):this._logError(this.getRune.name,"required params "+n.yellow("`id/runeID` (int)")+" not passed in")}},{key:"getSummonerSpells",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"summoner-spell",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getSummonerSpell",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.spellID,o=e.summonerSpellID,s=e.options,a=arguments[1];return Number.isInteger(r||i||o)?this._staticRequest({endUrl:"summoner-spell/"+(r||i||o),region:t,options:s},a):this._logError(this.getSummonerSpell.name,"required params "+n.yellow("`id/spellID/summonerSpellID` (int)")+" not passed in")}},{key:"getVersionData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"versions",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getShardStatus",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=arguments[1];return this._staticRequest({endUrl:"shard",region:t},r=t?r:arguments[0])}},{key:"getShardList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=arguments[1];return this._staticRequest({endUrl:"shards",region:t},r=t?r:arguments[0])}},{key:"getMatch",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.matchID,o=e.options,s=void 0===o?{includeTimeline:!0}:o,a=arguments[1];return Number.isInteger(r||i)?this._matchRequest({endUrl:""+(r||i),region:t,options:s},a):this._logError(this.getMatch.name,"required params "+n.yellow("`id/matchID` (int)")+" not passed in")}},{key:"getMatchList",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.id,o=t.summonerID,a=t.playerID,u=t.name,l=t.options,m=void 0===l?{rankedQueues:"RANKED_SOLO_5x5"}:l,g=arguments[1];return Number.isInteger(i||o||a)?this._matchListRequest({endUrl:""+(i||o||a),region:r,options:m},g):"object"===s(arguments[0])&&"string"==typeof u?this.getSummoner({name:u,region:r},function(t,n){return t?g(t):e._matchListRequest({endUrl:""+n[e._sanitizeName(u)].id,region:r,options:m},g)}):this._logError(this.getMatchList.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (str)")+" not passed in")}},{key:"getRunes",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.ids,o=t.id,a=t.summonerIDs,u=t.summonerID,l=t.playerIDs,m=t.playerID,g=t.names,d=t.name,h=arguments[1];return p.int(i||a||l)?this._runesMasteriesRequest({endUrl:(i||a||l).join()+"/runes",region:r},h):Number.isInteger(i||o||a||u||l||m)?this._runesMasteriesRequest({endUrl:(i||o||a||u||l||m)+"/runes",region:r},h):p.string(g)?this.getSummoners({names:g,region:r},function(t,n){if(t)return h(t);var i=[],o=!0,s=!1,a=void 0;try{for(var u,l=g[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var m=u.value;i.push(n[e._sanitizeName(m)].id)}}catch(e){s=!0,a=e}finally{try{!o&&l.return&&l.return()}finally{if(s)throw a}}return e._runesMasteriesRequest({endUrl:i.join(",")+"/runes",region:r},h)}):"object"!==s(arguments[0])||"string"!=typeof g&&"string"!=typeof d?this._logError(this.getRunes.name,"required params "+n.yellow("`ids/summonerIDs/playerIDs` ([int]/int)")+", "+n.yellow("`id/summonerID/playerID` (int)")+", "+n.yellow("`names` ([str]/str)")+", or "+n.yellow("`name` (str)")+" not passed in"):this.getSummoner({name:g||d,region:r},function(t,n){return t?h(t):e._runesMasteriesRequest({endUrl:n[e._sanitizeName(g||d)].id+"/runes",region:r},h)})}},{key:"getMasteries",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.ids,o=t.id,a=t.summonerIDs,u=t.summonerID,l=t.playerIDs,m=t.playerID,g=t.names,d=t.name,h=arguments[1];return p.int(i||a||l)?this._runesMasteriesRequest({endUrl:(i||a||l).join()+"/masteries",region:r},h):Number.isInteger(i||o||a||u||l||m)?this._runesMasteriesRequest({endUrl:(i||o||a||u||l||m)+"/masteries",region:r},h):p.string(g)?this.getSummoners({names:g,region:r},function(t,n){if(t)return h(t);var i=[],o=!0,s=!1,a=void 0;try{for(var u,l=g[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var m=u.value;i.push(n[e._sanitizeName(m)].id)}}catch(e){s=!0,a=e}finally{try{!o&&l.return&&l.return()}finally{if(s)throw a}}return e._runesMasteriesRequest({endUrl:i.join(",")+"/masteries",region:r},h)}):"object"!==s(arguments[0])||"string"!=typeof g&&"string"!=typeof d?this._logError(this.getMasteries.name,"required params "+n.yellow("`ids/summonerIDs/playerIDs` ([int]/int)")+", "+n.yellow("`id/summonerID/playerID` (int)")+", "+n.yellow("`names` ([str]/str)")+", or "+n.yellow("`name` (str)")+" not passed in"):this.getSummoner({name:g||d,region:r},function(t,n){return t?h(t):e._runesMasteriesRequest({endUrl:n[e._sanitizeName(g||d)].id+"/masteries",region:r},h)})}},{key:"getRankedStats",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.id,o=t.summonerID,a=t.playerID,u=t.name,l=t.options,m=arguments[1];return Number.isInteger(i||o||a)?this._statsRequest({endUrl:(i||o||a)+"/ranked",region:r,options:l},m):"object"===s(arguments[0])&&"string"==typeof u?this.getSummoner({name:u,region:r},function(t,n){return t?m(t):e._statsRequest({endUrl:n[e._sanitizeName(u)].id+"/ranked",region:r,options:l},m)}):void this._logError(this.getRankedStats.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (string)")+" not passed in")}},{key:"getStatsSummary",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.id,o=t.summonerID,a=t.playerID,u=t.name,l=t.options,m=arguments[1];return Number.isInteger(i||o||a)?this._statsRequest({endUrl:(i||o||a)+"/summary",region:r,options:l},m):"object"===s(arguments[0])&&"string"==typeof u?this.getSummoner({name:u,region:r},function(t,n){return t?m(t):e._statsRequest({endUrl:n[e._sanitizeName(u)].id+"/summary",region:r,options:l},m)}):void this._logError(this.getRankedStats.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (string)")+" not passed in")}},{key:"getSummoners",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.ids,o=t.id,a=t.summonerIDs,u=t.summonerID,l=t.playerIDs,m=t.playerID,g=t.names,d=t.name,h=arguments[1];return p.int(i||a||l)?this._summonerRequest({endUrl:""+(i||a||l).join(","),region:r},h):Number.isInteger(i||o||a||u||l||m)?this._summonerRequest({endUrl:""+(i||o||a||u||l||m),region:r},h):p.string(g)?this._summonerRequest({endUrl:"by-name/"+g.map(function(t){return e._sanitizeName(t)}).join(","),region:r},h):"object"!==s(arguments[0])||"string"!=typeof g&&"string"!=typeof d?void this._logError(this.getSummoners.name,"required params "+n.yellow("`ids/summonerIDs/playerIDs` ([int]/int)")+", "+n.yellow("`id/summonerID/playerID` (int)")+", "+n.yellow("`names` ([str]/str)")+", or "+n.yellow("`name` (str)")+" not passed in"):this._summonerRequest({endUrl:"by-name/"+this._sanitizeName(g||d),region:r},h)}},{key:"getSummoner",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.summonerID,o=e.playerID,a=e.name,u=arguments[1];return Number.isInteger(r||i||o)?this.getSummoners({region:t,ids:[r||i||o]},u):"object"===s(arguments[0])&&"string"==typeof a?this.getSummoners({region:t,names:[a]},u):this._logError(this.getSummoner.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (string)")+" not passed in")}},{key:"getSummonerNames",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.ids,i=e.id,o=e.summonerIDs,s=e.summonerID,a=e.playerIDs,u=e.playerID,l=arguments[1];return p.int(r||o||a)?this._summonerRequest({endUrl:(r||o||a).join(",")+"/name",region:t},l):Number.isInteger(r||i||o||s||a||u)?this._summonerRequest({endUrl:(r||i||o||s||a||u)+"/name",region:t},l):void this._logError(this.getSummonerNames.name,"required params "+n.yellow("required params `ids/summonerIDs/playerIDs` ([int]/int)")+" or "+n.yellow("`id/summonerID/playerID` (int)")+" not passed in")}},{key:"getSummonerName",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.summonerID,o=e.playerID,s=arguments[1];if(Number.isInteger(r))return this.getSummonerNames({region:t,id:r||i||o},s);this._logError(this.getSummonerName.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" not passed in")}}]),e}();e.exports=c});
!function(e,t){if("function"==typeof define&&define.amd)define("kindred-api",["module","double-ended-queue","request","chalk","xregexp"],t);else if("undefined"!=typeof exports)t(module,require("double-ended-queue"),require("request"),require("chalk"),require("xregexp"));else{var r={exports:{}};t(r,e.doubleEndedQueue,e.request,e.chalk,e.xregexp),e.kindredApi=r.exports}}(this,function(e,t,r,n,i){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(){function e(r,n){o(this,e),this.allowedRequests=r,this.seconds=n,this.madeRequests=new t}return a(e,[{key:"__reload",value:function(){for(var e=(new Date).getTime();this.madeRequests.length>0&&e-this.madeRequests.peekFront()>=1e3*this.seconds;)this.madeRequests.shift()}},{key:"addRequest",value:function(){this.madeRequests.push((new Date).getTime()+(1e3*this.seconds+1e3*this.seconds/75))}},{key:"requestAvailable",value:function(){return this.__reload(),this.madeRequests.length<this.allowedRequests}}]),e}(),l={BRAZIL:"BR1",EUROPE:"EUN1",EUROPE_WEST:"EUW1",KOREA:"KR",LATIN_AMERICA_NORTH:"LA1",LATIN_AMERICA_SOUTH:"LA2",NORTH_AMERICA:"NA1",OCEANIA:"OC1",RUSSIA:"RU",TURKEY:"TR1",JAPAN:"JP1"},m={BRAZIL:"br",EUROPE:"eune",EUROPE_WEST:"euw",KOREA:"kr",LATIN_AMERICA_NORTH:"lan",LATIN_AMERICA_SOUTH:"las",NORTH_AMERICA:"na",OCEANIA:"oce",RUSSIA:"ru",TURKEY:"tr",JAPAN:"jp"},g={br:"BRAZIL",eune:"EUROPE",euw:"EUROPE_WEST",kr:"KOREA",lan:"LATIN_AMERICA_NORTH",las:"LATIN_AMERICA_SOUTH",na:"NORTH_AMERICA",oce:"OCEANIA",ru:"RUSSIA",tr:"TURKEY",jp:"JAPAN"},d={CHAMPION:1.2,CURRENT_GAME:1,FEATURED_GAMES:1,GAME:1.3,LEAGUE:2.5,STATIC_DATA:1.2,STATUS:1,MATCH:2.2,MATCH_LIST:2.2,RUNES_MASTERIES:1.4,STATS:1.3,SUMMONER:1.4},h={int:function(e){return e.every(function(e){return Number.isInteger(e)})},string:function(e){return e.every(function(e){return"string"==typeof e})}},p={int:function(e){return e&&Array.isArray(e)&&h.int(e)&&e.length>0},string:function(e){return e&&Array.isArray(e)&&h.string(e)&&e.length>0}},y=i("^[0-9\\p{L} _\\.]+$"),c=function(){function e(t){var r=t.key,n=t.defaultRegion,i=void 0===n?m.NORTH_AMERICA:n,s=t.debug,a=void 0!==s&&s,l=t.limits;o(this,e),this.key=r,this.defaultRegion=i,this.debug=a,l&&(this.limits=[new u(l[0][0],l[0][1]),new u(l[1][0],l[1][1])])}return a(e,[{key:"canMakeRequest",value:function(){return!(!this.limits[0].requestAvailable()||!this.limits[1].requestAvailable())}},{key:"_sanitizeName",value:function(e){if(this._validName(e))return e.replace(/\s/g,"").toLowerCase();this._logError(this._validName.name,"Name "+n.yellow(e)+" is not valid. Request failed."),process.exit(1)}},{key:"_validName",value:function(e){return y.test(e)}},{key:"_makeUrl",value:function(e,t,r,n,i,o){var s=r?"":t+"/";return"https://"+t+".api.riotgames.com/"+(n||i||o?"":"api/lol/"+s)+encodeURI(e)+"?api_key="+this.key}},{key:"_baseRequest",value:function(e,t){var i=this,o=e.endUrl,s=e.region,a=void 0===s?this.defaultRegion:s,u=e.status,l=void 0!==u&&u,m=e.observerMode,g=void 0!==m&&m,d=e.staticReq,h=void 0!==d&&d,p=e.championMastery,y=void 0!==p&&p,c=e.options,v=void 0===c?{}:c,f=h?"global":a,R=this._makeUrl(o,f,h,l,g,y);if(!t)return void console.log(n.red("error: No callback passed in for the method call regarding `"+n.yellow(R)+"`"));this.limits?function e(){var i=this;this.canMakeRequest()?(h||(this.limits[0].addRequest(),this.limits[1].addRequest()),r({url:R,qs:v},function(r,o,s){var a=void 0,u=o.statusCode;return u>=200&&u<300?a=n.green(u):u>=400&&u<500?a=n.red(u):u>=500&&(a=n.bold.red(u)),i.debug&&(console.log(o&&a,R),console.log({"x-app-rate-limit-count":o.headers["x-app-rate-limit-count"],"x-method-rate-limit-count":o.headers["x-method-rate-limit-count"],"x-rate-limit-count":o.headers["x-rate-limit-count"],"retry-after":o.headers["retry-after"]}),console.log()),u>=500&&i.limits&&(i.debug&&console.log("!!! resending request !!!"),setTimeout(e.bind(i),1e3)),429===u&&i.limits&&(i.debug&&console.log("!!! resending request !!!"),setTimeout(e.bind(i),1e3*o.headers["retry-after"]+50)),u>=400?t(o&&a):t(r,JSON.parse(s))})):setTimeout(e.bind(this),1e3)}.bind(this)(R,v):r({url:R,qs:v},function(e,r,o){var s=void 0,a=r.statusCode;return a>=200&&a<300?s=n.green(a):a>=400&&a<500?s=n.red(a):a>=500&&(s=n.bold.red(a)),i.debug&&(console.log(r&&s,R),console.log({"x-app-rate-limit-count":r.headers["x-app-rate-limit-count"],"x-method-rate-limit-count":r.headers["x-method-rate-limit-count"],"x-rate-limit-count":r.headers["x-rate-limit-count"],"retry-after":r.headers["retry-after"]})),a>=400?t(r&&s):t(e,JSON.parse(o))})}},{key:"_observerRequest",value:function(e,t){var r=e.endUrl,n=e.region;return this._baseRequest({endUrl:"observer-mode/rest/"+r,observerMode:!0,region:n},t)}},{key:"_championRequest",value:function(e,t){var r=e.endUrl,n=e.region,i=e.options;return this._baseRequest({endUrl:"v"+d.CHAMPION+"/"+r,region:n,options:i},t)}},{key:"_championMasteryRequest",value:function(e,t){var r=e.endUrl,n=(e.region,e.options);return this._baseRequest({endUrl:"championmastery/location/"+r,options:n,championMastery:!0},t)}},{key:"_currentGameRequest",value:function(e,t){var r=e.endUrl,n=e.region,i=e.platformId;return this._observerRequest({endUrl:"consumer/getSpectatorGameInfo/"+i+"/"+r,region:n},t)}},{key:"_staticRequest",value:function(e,t){var r=e.endUrl,n=e.region,i=void 0===n?this.defaultRegion:n,o=e.options;return this._baseRequest({endUrl:"static-data/"+i+"/v"+d.STATIC_DATA+"/"+r,staticReq:!0,region:i,options:o},t)}},{key:"_statusRequest",value:function(e,t){var r=e.endUrl,n=(e.region,e.options);return this._baseRequest({endUrl:"lol/status/v"+d.STATUS+"/"+r,status:!0,options:n},t)}},{key:"_gameRequest",value:function(e,t){var r=e.endUrl,n=e.region;return this._baseRequest({endUrl:"v"+d.GAME+"/game/"+r,region:n},t)}},{key:"_leagueRequest",value:function(e,t){var r=e.endUrl,n=e.region,i=e.options;return this._baseRequest({endUrl:"v"+d.LEAGUE+"/league/"+r,region:n,options:i},t)}},{key:"_matchRequest",value:function(e,t){var r=e.endUrl,n=e.region,i=e.options;return this._baseRequest({endUrl:"v"+d.MATCH+"/match/"+r,region:n,options:i},t)}},{key:"_matchListRequest",value:function(e,t){var r=e.endUrl,n=e.region,i=e.options;return this._baseRequest({endUrl:"v"+d.MATCH_LIST+"/matchlist/by-summoner/"+r,region:n,options:i},t)}},{key:"_runesMasteriesRequest",value:function(e,t){var r=e.endUrl,n=e.region;return this._summonerRequest({endUrl:r,region:n},t)}},{key:"_statsRequest",value:function(e,t){var r=e.endUrl,n=e.region,i=e.options;return this._baseRequest({endUrl:"v"+d.STATS+"/stats/by-summoner/"+r,region:n,options:i},t)}},{key:"_summonerRequest",value:function(e,t){var r=e.endUrl,n=e.region;return this._baseRequest({endUrl:"v"+d.SUMMONER+"/summoner/"+r,region:n},t)}},{key:"_logError",value:function(e,t){console.log(n.bold.yellow(e),n.red("request"),n.bold.red("FAILED")+n.red("; "+t))}},{key:"setRegion",value:function(e){this.defaultRegion=e}},{key:"getChamps",value:function(e,t){var r=e.region,n=e.options;return this._championRequest({endUrl:"champion",region:r,options:n},t=r||n?t:arguments[0])}},{key:"getChamp",value:function(e,t){var r=e.region,i=e.id,o=e.championID;return Number.isInteger(i)||Number.isInteger(o)?this._championRequest({endUrl:"champion/"+(i||o),region:r}):this._logError(this.getChamp.name,"required params "+n.yellow("`id/championID` (int)")+" not passed in")}},{key:"getChampMastery",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=void 0===t?this.defaultRegion:t,i=e.playerID,o=e.championID,s=e.options,a=arguments[1];if(Number.isInteger(i)&&Number.isInteger(o)){var u=l[g[r]];return this._championMasteryRequest({endUrl:u+"/player/"+i+"/champion/"+o,region:r,options:s},a)}return this._logError(this.getChampMastery.name,"required params "+n.yellow("`playerID` (int) AND `championID` (int)")+" not passed in")}},{key:"getChampMasteries",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=void 0===r?this.defaultRegion:r,o=t.id,a=t.summonerID,u=t.playerID,m=t.name,d=t.options,h=arguments[1];if(Number.isInteger(o||a||u)){var p=l[g[i]];return this._championMasteryRequest({endUrl:p+"/player/"+(o||a||u)+"/champions",region:i,options:d},h)}if("object"===s(arguments[0])&&"string"==typeof m){var y=l[g[i]];return this.getSummoner({name:m,region:i},function(t,r){return t?h(t):e._championMasteryRequest({endUrl:y+"/player/"+r[e._sanitizeName(m)].id+"/champions",region:i},h)})}return this._logError(this.getChampMasteries.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (str)")+" not passed in")}},{key:"getTotalChampMasteryScore",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=void 0===r?this.defaultRegion:r,o=t.id,a=t.summonerID,u=t.playerID,m=t.name,d=t.options,h=arguments[1];if(Number.isInteger(o||a||u)){var p=l[g[i]];return this._championMasteryRequest({endUrl:p+"/player/"+(o||a||u)+"/score",region:i,options:d},h)}if("object"===s(arguments[0])&&"string"==typeof m){var y=l[g[i]];return this.getSummoner({name:m,region:i},function(t,r){return t?h(t):e._championMasteryRequest({endUrl:y+"/player/"+r[e._sanitizeName(m)].id+"/score",region:i},h)})}return this._logError(this.getTotalChampMasteryScore.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (str)")+" not passed in")}},{key:"getTopChamps",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=void 0===r?this.defaultRegion:r,o=t.id,a=t.summonerID,u=t.playerID,m=t.name,d=t.options,h=arguments[1];if(Number.isInteger(o||a||u)){var p=l[g[i]];return this._championMasteryRequest({endUrl:p+"/player/"+(o||a||u)+"/topchampions",region:i,options:d},h)}if("object"===s(arguments[0])&&"string"==typeof m){var y=l[g[i]];return this.getSummoner({name:m,region:i},function(t,r){return t?h(t):e._championMasteryRequest({endUrl:y+"/player/"+r[e._sanitizeName(m)].id+"/topchampions",region:i},h)})}return this._logError(this.getTopChamps.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (str)")+" not passed in")}},{key:"getCurrentGame",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=void 0===r?this.defaultRegion:r,o=t.id,a=t.summonerID,u=t.playerID,m=t.name,d=arguments[1],h=l[g[i]];return Number.isInteger(o||a||u)?this._currentGameRequest({endUrl:""+(o||a||u),platformId:h,region:i},d):"object"===s(arguments[0])&&"string"==typeof m?this.getSummoner({name:m,region:i},function(t,r){return t?d(t):e._currentGameRequest({endUrl:""+r[e._sanitizeName(m)].id,platformId:h,region:i},d)}):this._logError(this.getCurrentGame.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (string)")+" not passed in")}},{key:"getFeaturedGames",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=arguments[1];return this._observerRequest({endUrl:"featured",region:t},r=t?r:arguments[0])}},{key:"getRecentGames",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.id,o=t.summonerID,a=t.playerID,u=t.name,l=arguments[1];return Number.isInteger(i||o||a)?this._gameRequest({endUrl:"by-summoner/"+(i||o||a)+"/recent",region:r},l):"object"===s(arguments[0])&&"string"==typeof u?this.getSummoner({name:u,region:r},function(t,n){return t?l(t):e._gameRequest({endUrl:"by-summoner/"+n[e._sanitizeName(u)].id+"/recent",region:r},l)}):this._logError(this.getRecentGames.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (string)")+" not passed in")}},{key:"getLeagues",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.ids,o=t.id,a=t.summonerIDs,u=t.summonerID,l=t.playerIDs,m=t.playerID,g=t.names,d=t.name,h=arguments[1];return p.int(i||a||l)?this._leagueRequest({endUrl:"by-summoner/"+(i||a||l).join(","),region:r},h):Number.isInteger(i||o||a||u||l||m)?this._leagueRequest({endUrl:"by-summoner/"+(i||o||a||u||l||m),region:r},h):p.string(g)?this.getSummoners({names:g,region:r},function(t,n){if(t)return h(t);var i=[],o=!0,s=!1,a=void 0;try{for(var u,l=g[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var m=u.value;i.push(n[e._sanitizeName(m)].id)}}catch(e){s=!0,a=e}finally{try{!o&&l.return&&l.return()}finally{if(s)throw a}}return e._leagueRequest({endUrl:"by-summoner/"+i.join(","),region:r},h)}):"object"!==s(arguments[0])||"string"!=typeof g&&"string"!=typeof d?this._logError(this.getLeagues.name,"required params "+n.yellow("`ids/summonerIDs/playerIDs` ([int]/int)")+", "+n.yellow("`id/summonerID/playerID` (int)")+", "+n.yellow("`names` ([str]/str)")+", or "+n.yellow("`name` (str)")+" not passed in"):this.getSummoner({name:g||d,region:r},function(t,n){return t?h(t):e._leagueRequest({endUrl:"by-summoner/"+n[e._sanitizeName(g||d)].id,region:r},h)})}},{key:"getLeagueEntries",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.ids,o=t.id,a=t.summonerIDs,u=t.summonerID,l=t.playerIDs,m=t.playerID,g=t.names,d=t.name,h=arguments[1];return p.int(i||a||l)?this._leagueRequest({endUrl:"by-summoner/"+(i||a||l).join(",")+"/entry",region:r},h):Number.isInteger(i||o||a||u||l||m)?this._leagueRequest({endUrl:"by-summoner/"+(i||o||a||u||l||m)+"/entry",region:r},h):p.string(g)?this.getSummoners({names:g,region:r},function(t,n){if(t)return h(t);var i=[],o=!0,s=!1,a=void 0;try{for(var u,l=g[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var m=u.value;i.push(n[e._sanitizeName(m)].id)}}catch(e){s=!0,a=e}finally{try{!o&&l.return&&l.return()}finally{if(s)throw a}}return e._leagueRequest({endUrl:"by-summoner/"+i.join(",")+"/entry",region:r},h)}):"object"!==s(arguments[0])||"string"!=typeof g&&"string"!=typeof d?void this._logError(this.getLeagueEntries.name,"required params "+n.yellow("`ids/summonerIDs/playerIDs` ([int]/int)")+", "+n.yellow("`id/summonerID/playerID` (int)")+", "+n.yellow("`names` ([str]/str)")+", or "+n.yellow("`name` (str)")+" not passed in"):this.getSummoner({name:g||d,region:r},function(t,n){return t?h(t):e._leagueRequest({endUrl:"by-summoner/"+n[e._sanitizeName(g||d)].id+"/entry",region:r},h)})}},{key:"getChallengers",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=void 0===r?{type:"RANKED_SOLO_5x5"}:r,i=arguments[1];return this._leagueRequest({endUrl:"challenger",region:t,options:n},i=t?i:arguments[0])}},{key:"getMasters",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=void 0===r?{type:"RANKED_SOLO_5x5"}:r,i=arguments[1];return this._leagueRequest({endUrl:"master",region:t,options:n},i=t?i:arguments[0])}},{key:"getChampionList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"champion",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getChampion",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.championID,o=e.options,s=arguments[1];return Number.isInteger(r||i)?this._staticRequest({endUrl:"champion/"+(r||i),region:t,options:o},s):this._logError(this.getChampion.name,"required params "+n.yellow("`id/championID` (int)")+" not passed in")}},{key:"getItems",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"item",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getItem",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.itemID,o=e.options,s=arguments[1];return Number.isInteger(r||i)?this._staticRequest({endUrl:"item/"+(r||i),region:t,options:o},s):this._logError(this.getItem.name,"required params "+n.yellow("`id/itemID` (int)")+" not passed in")}},{key:"getLanguageStrings",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"language-strings",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getLanguages",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=arguments[1];return this._staticRequest({endUrl:"languages",region:t},r=t?r:arguments[0])}},{key:"getMap",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"map",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getMasteryList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"mastery",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getMastery",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.masteryID,o=e.options,s=arguments[1];return Number.isInteger(r||i)?this._staticRequest({endUrl:"mastery/"+(r||i),region:t,options:o},s):this._logError(this.getMastery.name,"required params "+n.yellow("`id/masteryID` (int)")+" not passed in")}},{key:"getRealmData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=arguments[1];return this._staticRequest({endUrl:"realm",region:t},r=t?r:arguments[0])}},{key:"getRuneList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"rune",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getRune",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.runeID,o=e.options,s=arguments[1];return Number.isInteger(r||i)?this._staticRequest({endUrl:"rune/"+(r||i),region:t,options:o},s):this._logError(this.getRune.name,"required params "+n.yellow("`id/runeID` (int)")+" not passed in")}},{key:"getSummonerSpells",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"summoner-spell",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getSummonerSpell",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.spellID,o=e.summonerSpellID,s=e.options,a=arguments[1];return Number.isInteger(r||i||o)?this._staticRequest({endUrl:"summoner-spell/"+(r||i||o),region:t,options:s},a):this._logError(this.getSummonerSpell.name,"required params "+n.yellow("`id/spellID/summonerSpellID` (int)")+" not passed in")}},{key:"getVersionData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.options,n=arguments[1];return this._staticRequest({endUrl:"versions",region:t,options:r},n=t||r?n:arguments[0])}},{key:"getShardStatus",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=arguments[1];return this._statusRequest({endUrl:"shard",region:t},r=t?r:arguments[0])}},{key:"getShardList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=arguments[1];return this._statusRequest({endUrl:"shards",region:t},r=t?r:arguments[0])}},{key:"getMatch",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.matchID,o=e.options,s=void 0===o?{includeTimeline:!0}:o,a=arguments[1];return Number.isInteger(r||i)?this._matchRequest({endUrl:""+(r||i),region:t,options:s},a):this._logError(this.getMatch.name,"required params "+n.yellow("`id/matchID` (int)")+" not passed in")}},{key:"getMatchList",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.id,o=t.summonerID,a=t.playerID,u=t.name,l=t.options,m=void 0===l?{rankedQueues:"RANKED_SOLO_5x5"}:l,g=arguments[1];return Number.isInteger(i||o||a)?this._matchListRequest({endUrl:""+(i||o||a),region:r,options:m},g):"object"===s(arguments[0])&&"string"==typeof u?this.getSummoner({name:u,region:r},function(t,n){return t?g(t):e._matchListRequest({endUrl:""+n[e._sanitizeName(u)].id,region:r,options:m},g)}):this._logError(this.getMatchList.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (str)")+" not passed in")}},{key:"getRunes",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.ids,o=t.id,a=t.summonerIDs,u=t.summonerID,l=t.playerIDs,m=t.playerID,g=t.names,d=t.name,h=arguments[1];return p.int(i||a||l)?this._runesMasteriesRequest({endUrl:(i||a||l).join()+"/runes",region:r},h):Number.isInteger(i||o||a||u||l||m)?this._runesMasteriesRequest({endUrl:(i||o||a||u||l||m)+"/runes",region:r},h):p.string(g)?this.getSummoners({names:g,region:r},function(t,n){if(t)return h(t);var i=[],o=!0,s=!1,a=void 0;try{for(var u,l=g[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var m=u.value;i.push(n[e._sanitizeName(m)].id)}}catch(e){s=!0,a=e}finally{try{!o&&l.return&&l.return()}finally{if(s)throw a}}return e._runesMasteriesRequest({endUrl:i.join(",")+"/runes",region:r},h)}):"object"!==s(arguments[0])||"string"!=typeof g&&"string"!=typeof d?this._logError(this.getRunes.name,"required params "+n.yellow("`ids/summonerIDs/playerIDs` ([int]/int)")+", "+n.yellow("`id/summonerID/playerID` (int)")+", "+n.yellow("`names` ([str]/str)")+", or "+n.yellow("`name` (str)")+" not passed in"):this.getSummoner({name:g||d,region:r},function(t,n){return t?h(t):e._runesMasteriesRequest({endUrl:n[e._sanitizeName(g||d)].id+"/runes",region:r},h)})}},{key:"getMasteries",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.ids,o=t.id,a=t.summonerIDs,u=t.summonerID,l=t.playerIDs,m=t.playerID,g=t.names,d=t.name,h=arguments[1];return p.int(i||a||l)?this._runesMasteriesRequest({endUrl:(i||a||l).join()+"/masteries",region:r},h):Number.isInteger(i||o||a||u||l||m)?this._runesMasteriesRequest({endUrl:(i||o||a||u||l||m)+"/masteries",region:r},h):p.string(g)?this.getSummoners({names:g,region:r},function(t,n){if(t)return h(t);var i=[],o=!0,s=!1,a=void 0;try{for(var u,l=g[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var m=u.value;i.push(n[e._sanitizeName(m)].id)}}catch(e){s=!0,a=e}finally{try{!o&&l.return&&l.return()}finally{if(s)throw a}}return e._runesMasteriesRequest({endUrl:i.join(",")+"/masteries",region:r},h)}):"object"!==s(arguments[0])||"string"!=typeof g&&"string"!=typeof d?this._logError(this.getMasteries.name,"required params "+n.yellow("`ids/summonerIDs/playerIDs` ([int]/int)")+", "+n.yellow("`id/summonerID/playerID` (int)")+", "+n.yellow("`names` ([str]/str)")+", or "+n.yellow("`name` (str)")+" not passed in"):this.getSummoner({name:g||d,region:r},function(t,n){return t?h(t):e._runesMasteriesRequest({endUrl:n[e._sanitizeName(g||d)].id+"/masteries",region:r},h)})}},{key:"getRankedStats",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.id,o=t.summonerID,a=t.playerID,u=t.name,l=t.options,m=arguments[1];return Number.isInteger(i||o||a)?this._statsRequest({endUrl:(i||o||a)+"/ranked",region:r,options:l},m):"object"===s(arguments[0])&&"string"==typeof u?this.getSummoner({name:u,region:r},function(t,n){return t?m(t):e._statsRequest({endUrl:n[e._sanitizeName(u)].id+"/ranked",region:r,options:l},m)}):void this._logError(this.getRankedStats.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (string)")+" not passed in")}},{key:"getStatsSummary",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.id,o=t.summonerID,a=t.playerID,u=t.name,l=t.options,m=arguments[1];return Number.isInteger(i||o||a)?this._statsRequest({endUrl:(i||o||a)+"/summary",region:r,options:l},m):"object"===s(arguments[0])&&"string"==typeof u?this.getSummoner({name:u,region:r},function(t,n){return t?m(t):e._statsRequest({endUrl:n[e._sanitizeName(u)].id+"/summary",region:r,options:l},m)}):void this._logError(this.getRankedStats.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (string)")+" not passed in")}},{key:"getSummoners",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.region,i=t.ids,o=t.id,a=t.summonerIDs,u=t.summonerID,l=t.playerIDs,m=t.playerID,g=t.names,d=t.name,h=arguments[1];return p.int(i||a||l)?this._summonerRequest({endUrl:""+(i||a||l).join(","),region:r},h):Number.isInteger(i||o||a||u||l||m)?this._summonerRequest({endUrl:""+(i||o||a||u||l||m),region:r},h):p.string(g)?this._summonerRequest({endUrl:"by-name/"+g.map(function(t){return e._sanitizeName(t)}).join(","),region:r},h):"object"!==s(arguments[0])||"string"!=typeof g&&"string"!=typeof d?void this._logError(this.getSummoners.name,"required params "+n.yellow("`ids/summonerIDs/playerIDs` ([int]/int)")+", "+n.yellow("`id/summonerID/playerID` (int)")+", "+n.yellow("`names` ([str]/str)")+", or "+n.yellow("`name` (str)")+" not passed in"):this._summonerRequest({endUrl:"by-name/"+this._sanitizeName(g||d),region:r},h)}},{key:"getSummoner",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.summonerID,o=e.playerID,a=e.name,u=arguments[1];return Number.isInteger(r||i||o)?this.getSummoners({region:t,ids:[r||i||o]},u):"object"===s(arguments[0])&&"string"==typeof a?this.getSummoners({region:t,names:[a]},u):this._logError(this.getSummoner.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" or "+n.yellow("`name` (string)")+" not passed in")}},{key:"getSummonerNames",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.ids,i=e.id,o=e.summonerIDs,s=e.summonerID,a=e.playerIDs,u=e.playerID,l=arguments[1];return p.int(r||o||a)?this._summonerRequest({endUrl:(r||o||a).join(",")+"/name",region:t},l):Number.isInteger(r||i||o||s||a||u)?this._summonerRequest({endUrl:(r||i||o||s||a||u)+"/name",region:t},l):void this._logError(this.getSummonerNames.name,"required params "+n.yellow("required params `ids/summonerIDs/playerIDs` ([int]/int)")+" or "+n.yellow("`id/summonerID/playerID` (int)")+" not passed in")}},{key:"getSummonerName",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.region,r=e.id,i=e.summonerID,o=e.playerID,s=arguments[1];if(Number.isInteger(r))return this.getSummonerNames({region:t,id:r||i||o},s);this._logError(this.getSummonerName.name,"required params "+n.yellow("`id/summonerID/playerID` (int)")+" not passed in")}}]),e}();e.exports=c});
{
"name": "kindred-api",
"version": "1.0.3",
"version": "1.0.4",
"description": "Kindred is a thin Node.js wrapper on top of Riot Games API for League of Legends",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -371,2 +371,3 @@ # Kindred

k.getLeagues({ names: ['Richelle', 'Grigne'] }, rprint)
/* Note: I handle that platform id stuffs. */
k.getCurrentGame({ name: 'Fràe', region: REGIONS.OCEANIA }, rprint)

@@ -373,0 +374,0 @@

@@ -56,3 +56,3 @@ const request = require('request')

const mid = staticReq ? '' : `${region}/`
const prefix = !status && !observerMode && !championMastery ? `api/lol/${mid}` : observerMode || championMastery ? '' : 'lol/status/'
const prefix = !status && !observerMode && !championMastery ? `api/lol/${mid}` : ''

@@ -187,2 +187,10 @@ return `https://${region}.api.riotgames.com/${prefix}${encodeURI(query)}?api_key=${this.key}`

_statusRequest({ endUrl, region, options }, cb) {
return this._baseRequest({
endUrl: `lol/status/v${VERSIONS.STATUS}/${endUrl}`,
status: true,
options
}, cb)
}
_gameRequest({ endUrl, region }, cb) {

@@ -200,6 +208,2 @@ return this._baseRequest({

_staticRequest({ endUrl, region }, cb) {
return this._baseRequest({ endUrl: `v${VERSIONS.STATUS}/${endUrl}`, region, status: true }, cb)
}
_matchRequest({ endUrl, region, options }, cb) {

@@ -506,3 +510,3 @@ return this._baseRequest({

if (Number.isInteger(id || championID)) {
this._staticRequest({ endUrl: `champion/${id || championID}`, region, options }, cb)
return this._staticRequest({ endUrl: `champion/${id || championID}`, region, options }, cb)
} else {

@@ -604,7 +608,7 @@ return this._logError(

getShardStatus({ region } = {}, cb) {
return this._staticRequest({ endUrl: 'shard', region }, cb = region ? cb : arguments[0])
return this._statusRequest({ endUrl: 'shard', region }, cb = region ? cb : arguments[0])
}
getShardList({ region } = {}, cb) {
return this._staticRequest({ endUrl: 'shards', region }, cb = region ? cb : arguments[0])
return this._statusRequest({ endUrl: 'shards', region }, cb = region ? cb : arguments[0])
}

@@ -611,0 +615,0 @@

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