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

@vermaysha/hoyolab-api

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vermaysha/hoyolab-api - npm Package Compare versions

Comparing version 1.7.1 to 1.7.2

12

dist/Helpers/getRegionByUid.js

@@ -5,4 +5,8 @@ "use strict";

function getRegionByUid(uid) {
const server_region = Number(uid.toString().slice(0, 1));
const server_region = Number(uid.toString().trim().slice(0, 1));
switch (server_region) {
case 7:
return 'os_euro';
case 6:
return 'os_usa';
case 8:

@@ -12,10 +16,6 @@ return 'os_asia';

return 'os_cht';
case 7:
return 'os_euro';
case 6:
return 'os_usa';
default:
throw new Error('Invalid UID');
throw new Error(`UID ${uid} is invalid !`);
}
}
exports.getRegionByUid = getRegionByUid;
{
"name": "@vermaysha/hoyolab-api",
"version": "1.7.1",
"version": "1.7.2",
"description": "Unonfficial Hoyolab API Wrapper",

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

@@ -1,3 +0,24 @@

# HoYoLab API - TypeScript/JavaScript HoYoLab API
<div align="center">
<h1>HoYoLab API - TypeScript/JavaScript HoYoLab API</h1>
<p>
<a href="https://packagist.org/packages/vermaysha/hoyolab-api">
<img src="https://img.shields.io/npm/v/@vermaysha/hoyolab-api.svg?style=flat-square" alt="Latest Version on Packagist">
</a>
<a href="https://github.com/vermaysha/hoyolab-api/actions/workflows/build.yml">
<img src="https://img.shields.io/github/actions/workflow/status/vermaysha/hoyolab-api/build.yml?branch=master&amp;label=build&amp;style=flat-square" alt="GitHub Build Action Status">
</a>
<a href="https://www.npmjs.com/package/@vermaysha/hoyolab-api">
<img src="https://img.shields.io/npm/dt/@vermaysha/hoyolab-api.svg?style=flat-square" alt="Total Downloads">
</a>
<a href="LICENSE.md">
<img src="https://img.shields.io/github/license/vermaysha/hoyolab-api?style=flat-square" alt="LICENSE">
</a>
<a href="https://github.com/vermaysha/hoyolab-api/releases/latest">
<img src="https://img.shields.io/github/release-date/vermaysha/hoyolab-api?style=flat-square" alt="GitHub Release Date - Published_At">
</a>
</p>
</div>
Its unofficial HoYoLab API Wrapper for getting hoyoverse some in-game data, including Genshin Impact, Honkai Impact 3rd.

@@ -4,0 +25,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