
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
Get a League of Legends champion from their key.
var champion = require('champion');
champion(117);
// => {
// => "version": "3.10.3",
// => "id": "Lulu",
// => "key": "117",
// => "name": "Lulu",
// => "title": "the Fae Sorceress",
// => /* etc, etc. */
// => }
You would probably use this with node-resteemo:
var resteemo = require('resteemo')('string with contact info');
resteemo.player.ingame('na', 'king trick', function(error, response) {
if (error) throw error;
var championID = response.data.game.playerChampionSelections.array[0].championId;
champion(championID);
// Now you know the champion that 'king trick' is playing.
});
$ npm install champion
Browserify for the browser or use Component:
$ component install KenanY/champion
Look up a champion using a Number key and return an Object containing
metadata on the champion. If key does not match that of any champion, null
is returned.
Yeah, it's huge, but the current method is better than using fs or http.
If a new champion hasn't been added to the array yet, feel free to open a pull request. In the future, I might move the array to its own module so that others can use it in their modules.
Originally, this module used fs.createReadStream in order to load a JSON file
of champions. This ReadStream was then piped to
JSONStream, but this caused
problems because of a
known issue involving
precise numbers (which are used for a champion's health regeneration and such).
Using fs also prevented this module from working in the browser. So, I did a
quick refactor and replaced the JSON file with a JavaScript one. This JavaScript
file exports the array of champions and as such can be require()d and
browserified.
FAQs
Get a League of Legends champion from their key.
We found that champion demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.