You've already forked tf2wikipricing
lint: use boolean
This commit is contained in:
@@ -36,15 +36,15 @@ export class ItemSchema {
|
|||||||
[key: string]: {
|
[key: string]: {
|
||||||
name: string,
|
name: string,
|
||||||
slot: ItemSlot,
|
slot: ItemSlot,
|
||||||
tradable: Boolean,
|
tradable: boolean,
|
||||||
hasAustraliumVariant: Boolean,
|
hasAustraliumVariant: boolean,
|
||||||
festiveVariant: number | null
|
festiveVariant: number | null
|
||||||
botkillerVariants: Array<number> | null
|
botkillerVariants: Array<number> | null
|
||||||
canKillstreakify: Boolean
|
canKillstreakify: boolean
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getItemIndexByName(schema: ItemSchema, name: string, excludeStock: Boolean = true, excludeDecorated: Boolean = true) {
|
export function getItemIndexByName(schema: ItemSchema, name: string, excludeStock: boolean = true, excludeDecorated: boolean = true) {
|
||||||
for (const [defindex, value] of Object.entries(schema)) {
|
for (const [defindex, value] of Object.entries(schema)) {
|
||||||
if (value['name'] == name) {
|
if (value['name'] == name) {
|
||||||
const index = parseInt(defindex)
|
const index = parseInt(defindex)
|
||||||
@@ -60,7 +60,7 @@ export function getTradableStatusByDefindex(schema: ItemSchema, defindex: number
|
|||||||
return schema[defindex.toString()].tradable
|
return schema[defindex.toString()].tradable
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getTradableStatusByName(schema: ItemSchema, name: string, excludeStock: Boolean = true, excludeDecorated = true,) {
|
export function getTradableStatusByName(schema: ItemSchema, name: string, excludeStock: boolean = true, excludeDecorated = true,) {
|
||||||
for (const [defindex, value] of Object.entries(schema)) {
|
for (const [defindex, value] of Object.entries(schema)) {
|
||||||
if (value['name'] == name) {
|
if (value['name'] == name) {
|
||||||
const index = parseInt(defindex)
|
const index = parseInt(defindex)
|
||||||
|
|||||||
Reference in New Issue
Block a user