@vermaysha/hoyolab-api
Advanced tools
Comparing version 1.7.1 to 1.7.2
@@ -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&label=build&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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
58016
60