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

genshin-db

Package Overview
Dependencies
Maintainers
1
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

genshin-db - npm Package Compare versions

Comparing version 1.7.2 to 1.8.0

src/english/constellations/amber.json

46

examples.md

@@ -10,2 +10,3 @@ # Examples

- [genshin.characters(query[, opts])](#genshincharactersquery-opts)
- [genshin.constellations(query[, opts])](#genshinconstellationsquery-opts)
- [genshin.weapons(query[, opts])](#genshinweaponsquery-opts)

@@ -93,3 +94,48 @@ - [genshin.weaponmaterialtypes(query[, opts])](#genshinweaponmaterialtypesquery-opts)

# genshin.constellations(query[, opts])
- [genshin.constellations('amber')](#genshinconstellationsamber)
- [genshin.constellations('childe').c3](#genshinconstellationschildec3)
## genshin.constellations('amber')
```js
{
"name": "Amber",
"c1": {
"name": "One Arrow to Rule Them All",
"effect": "Fires 2 arrows per Aimed Shot. The second arrow deals 20% of the first arrow's DMG."
},
"c2": {
"name": "Bunny Triggered",
"effect": "Baron Bunny, new and improved! Hitting Baron Bunny's foot with a fully-charged Aimed Shot manually detonates it. Explosion via manual detonation deals 200% additional DMG."
},
"c3": {
"name": "It Burns!",
"effect": "Increases the Level of Fiery Rain by 3. Maximum upgrade level is 15."
},
"c4": {
"name": "It's Not Just Any Doll...",
"effect": "Decreases Explosive Puppet's CD by 20%. Adds 1 additional charge."
},
"c5": {
"name": "It's Baron Bunny!",
"effect": "Increases the Level of Explosive Puppet by 3. Maximum upgrade level is 15."
},
"c6": {
"name": "Wildfire",
"effect": "Fiery Rain increases all party members' Movement SPD by 15% and ATK by 15% for 10s."
}
}
```
## genshin.constellations('childe').c3
```js
{
name: 'Abyssal Mayhem: Vortex of Turmoil',
effect: 'Increases the Level of Foul Legacy: Raging Tide by 3. Maximum upgrade level is 15.'
}
```
# genshin.weapons(query[, opts])

@@ -96,0 +142,0 @@

2

package.json
{
"name": "genshin-db",
"version": "1.7.2",
"version": "1.8.0",
"description": "api for detailed information on genshin impact based on version 1.0.1 from the fandom and various others.",

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

@@ -22,2 +22,3 @@ # genshin-db

- [genshin.characters(query[, opts])](#genshincharactersquery-opts)
- [genshin.constellations(query[, opts])](#genshinconstellationsquery-opts)
- [genshin.weapons(query[, opts])](#genshinweaponsquery-opts)

@@ -50,2 +51,11 @@ - [genshin.weaponmaterialtypes(query[, opts])](#genshinweaponmaterialtypesquery-opts)

## genshin.constellations(query[, opts])
Possible inputs for query paremter are:
- all character names
Check out [categories.json](https://github.com/theBowja/genshin-db/blob/main/src/english/categories.json) file to see choices for each category.
Check out [examples.md](https://github.com/theBowja/genshin-db/blob/main/examples.md#genshinconstellationsquery-opts) to see example inputs and outputs for this function.
## genshin.weapons(query[, opts])

@@ -52,0 +62,0 @@

{
"languages": ["english"],
"folders": ["characters", "weapons", "elements", "rarity", "artifacts", "weaponmaterialtypes", "talentmaterialtypes"],
"folders": ["characters", "weapons", "elements", "rarity", "artifacts",
"weaponmaterialtypes", "talentmaterialtypes", "constellations"],
"indexByCategories": {

@@ -12,4 +13,5 @@ "characters": ["element", "weapontype", "talentmaterialtype", "gender", "region", "rarity"],

"altnames": {
"weaponmaterialtypes": ["2starname", "3starname", "4starname", "5starname"]
"weaponmaterialtypes": ["2starname", "3starname", "4starname", "5starname"],
"constellations": ["aliases"]
}
}

@@ -9,3 +9,3 @@ {

"baseatk": "38",
"ability": "HP 10,2%",
"ability": "HP 10.2%",
"passive": {

@@ -12,0 +12,0 @@ "passive_name": "Bane of the Soft",

@@ -9,3 +9,3 @@ {

"baseatk": "39",
"ability": "ATK 7,7%",
"ability": "ATK 7.7%",
"passive": {

@@ -12,0 +12,0 @@ "passive_name": "Bane of Water and Ice",

@@ -9,3 +9,3 @@ {

"baseatk": "44",
"ability": "Physhical Dmg Bonus 7,5%",
"ability": "Physical Dmg Bonus 7.5%",
"passive": {

@@ -12,0 +12,0 @@ "passive_name": "Infusion Needle",

@@ -9,3 +9,3 @@ {

"baseatk": "39",
"ability": "ATK 7,7%",
"ability": "ATK 7.7%",
"passive": {

@@ -12,0 +12,0 @@ "passive_name": "Blunt Conclusion",

@@ -9,3 +9,3 @@ {

"baseatk": "41",
"ability": "Energy Recharge 13,3%",
"ability": "Energy Recharge 13.3%",
"passive": {

@@ -12,0 +12,0 @@ "passive_name": "Windfall",

@@ -9,3 +9,3 @@ {

"baseatk": "44",
"ability": "Energy Recharge 6,7%",
"ability": "Energy Recharge 6.7%",
"passive": {

@@ -12,0 +12,0 @@ "passive_name": "Windfall",

@@ -9,3 +9,3 @@ {

"baseatk": "41",
"ability": "Energy Recharge 13,3%",
"ability": "Energy Recharge 13.3%",
"passive": {

@@ -12,0 +12,0 @@ "passive_name": "Windfall",

@@ -9,3 +9,3 @@ {

"baseatk": "39",
"ability": "Base HP 7,7%",
"ability": "Base HP 7.7%",
"passive": {

@@ -12,0 +12,0 @@ "passive_name": "Unbending",

@@ -9,3 +9,3 @@ {

"baseatk": "39",
"ability": "ATK 7,7%",
"ability": "ATK 7.7%",
"passive": {

@@ -12,0 +12,0 @@ "passive_name": "Gash",

@@ -9,3 +9,3 @@ {

"baseatk": "40",
"ability": "ATK 5,1%",
"ability": "ATK 5.1%",
"passive": {

@@ -12,0 +12,0 @@ "passive_name": "Heavy",

@@ -9,3 +9,3 @@ {

"baseatk": "39",
"ability": "Crit Dmg 10,2%",
"ability": "Crit Dmg 10.2%",
"passive": {

@@ -12,0 +12,0 @@ "passive_name": "Vigorous",

@@ -9,3 +9,3 @@ {

"baseatk": "46",
"ability": "ATK 10,8%",
"ability": "ATK 10.8%",
"passive": {

@@ -12,0 +12,0 @@ "passive_name": "Rainbow-Piercing Stinger",

@@ -9,3 +9,3 @@ {

"baseatk": "40",
"ability": "Crit DMG 6,8%",
"ability": "Crit DMG 6.8%",
"passive": {

@@ -12,0 +12,0 @@ "passive_name": "Archer's Message",

@@ -9,3 +9,3 @@ {

"baseatk": "39",
"ability": "Energy Recharge 8,5%",
"ability": "Energy Recharge 8.5%",
"passive": {

@@ -12,0 +12,0 @@ "passive_name": "Energy Shower",

@@ -9,3 +9,3 @@ {

"baseatk": "48",
"ability": "Crit Rate 4,8%",
"ability": "Crit Rate 4.8%",
"passive": {

@@ -12,0 +12,0 @@ "passive_name": "Eagle Spear of Justice",

@@ -9,3 +9,3 @@ {

"baseatk": "38",
"ability": "Base HP 10,2%",
"ability": "Base HP 10.2%",
"passive": {

@@ -12,0 +12,0 @@ "passive_name": "Cull the Weak",

@@ -9,3 +9,3 @@ {

"baseatk": "39",
"ability": "Crit DMG 10,2%",
"ability": "Crit DMG 10.2%",
"passive": {

@@ -12,0 +12,0 @@ "passive_name": "Precise",

@@ -9,3 +9,3 @@ {

"baseatk": "39",
"ability": "Physical Dmg Bonus 9,6%",
"ability": "Physical Dmg Bonus 9.6%",
"passive": {

@@ -12,0 +12,0 @@ "passive_name": "Courage",

@@ -9,3 +9,3 @@ {

"baseatk": "38",
"ability": "Crit Rate 6,8%",
"ability": "Crit Rate 6.8%",
"passive": {

@@ -12,0 +12,0 @@ "passive_name": "Slingshot",

@@ -9,3 +9,3 @@ {

"baseatk": "39",
"ability": "ATK 7,7%",
"ability": "ATK 7.7%",
"passive": {

@@ -12,0 +12,0 @@ "passive_name": "Descension",

@@ -9,3 +9,3 @@ {

"baseatk": "39",
"ability": "Base HP 7,7%",
"ability": "Base HP 7.7%",
"passive": {

@@ -12,0 +12,0 @@ "passive_name": "Legacy",

@@ -9,3 +9,3 @@ {

"baseatk": "40",
"ability": "Deff 6,4%",
"ability": "Def 6.4%",
"passive": {

@@ -12,0 +12,0 @@ "passive_name": "Journey",

@@ -9,3 +9,3 @@ {

"baseatk": "40",
"ability": "Crit Rate 3,4%",
"ability": "Crit Rate 3.4%",
"passive": {

@@ -12,0 +12,0 @@ "passive_name": "Guerilla Tactic",

@@ -9,3 +9,3 @@ {

"baseatk": "39",
"ability": "Deff 9,6%",
"ability": "Def 9.6%",
"passive": {

@@ -12,0 +12,0 @@ "passive_name": "Cull the Weak",

@@ -9,3 +9,3 @@ {

"baseatk": "39",
"ability": "Crit Rate 5,1%",
"ability": "Crit Rate 5.1%",
"passive": {

@@ -12,0 +12,0 @@ "passive_name": "Sharp",

@@ -19,3 +19,3 @@ const fs = require('fs');

const data = require(`./${lang}/${folder}/${filename}`);
if(data.name === undefined) return; // go next file if this one doesn't have name property
if(data.name === undefined || data.name === "") return; // go next file if this one doesn't have name property

@@ -25,6 +25,12 @@ index.file.push(filename);

if(design.altnames[folder] !== undefined) {
for(let altname of design.altnames[folder]) {
if(data[altname] !== undefined && data[altname] !== "") {
index.file.push(filename);
index.names.push(data[altname])
for(let altname of design.altnames[folder]) { // add all the altnames to the index
let values = data[altname];
if(values === undefined || values === "") continue;
if(!Array.isArray(values))
values = [values];
for(let val of values) {
if(val !== undefined && val !== "") {
index.file.push(filename);
index.names.push(val)
}
}

@@ -38,3 +44,3 @@ }

let values = data[prop];
if(values === undefined || values === "") continue;
if(values === undefined || values === "" ) continue;
if(!Array.isArray(values))

@@ -41,0 +47,0 @@ values = [values];

@@ -100,2 +100,3 @@ {

"Lost Prayer to the Sacred Winds",
"Memory of Dust",
"Primordial Jade Winged-Spear",

@@ -153,2 +154,3 @@ "Skyward Atlas",

"mappamare.json",
"memoryofdust.json",
"messenger.json",

@@ -252,2 +254,3 @@ "oldmercspal.json",

"Mappa Mare",
"Memory of Dust",
"Messenger",

@@ -362,2 +365,3 @@ "Old Merc's Pal",

"Mappa Mare",
"Memory of Dust",
"Otherworldly Story",

@@ -504,2 +508,3 @@ "Pocket Grimoire",

"Mappa Mare",
"Memory of Dust",
"Prototype Aminus",

@@ -506,0 +511,0 @@ "Prototype Grudge",

@@ -122,2 +122,6 @@ const fuzzysort = require('fuzzysort');

genshin.constellations = function(query, opts={}) {
return searchFolder(query, 'constellations', opts);
}
genshin.artifacts = function(query, opts={}) {

@@ -124,0 +128,0 @@ return searchFolder(query, 'artifacts', opts);

@@ -7,3 +7,3 @@ ## Todo

- [ ] add talents
- [ ] add constellation
- [ ] finish constellation
- [ ] add cooking/ingredients

@@ -17,5 +17,3 @@ - [ ] add domains

- [ ] add scaling calculators
- [ ] support possible name aliases for query
- [ ] ground pound ur mom
- [ ] lore???
- [ ] npc???

@@ -41,3 +39,15 @@ - [ ] pretend to add tests

## Missing constellations for
- [ ] diluc
- [ ] jean
- [ ] mona
- [ ] qiqi
- [ ] razor
- [ ] venti
- [ ] xiao
- [ ] zhongli
## Done
- [x] support possible name aliases for query (11/24)
- [x] added most constellations (11/24)
- [x] added english voice actors for characters (11/10)

@@ -44,0 +54,0 @@ - [x] added new characters xiao, tartaglia, diona, zhongli (11/10)

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