Skip to content

Commit

Permalink
Cleaned code
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicklason committed Jun 24, 2019
1 parent a6e5c03 commit 1af04ab
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class SKU {

let sku = `${item.defindex};${item.quality}`;

if (item.effect !== null) {
if (item.effect) {
sku += `;u${item.effect}`;
}
if (item.australium === true) {
Expand All @@ -97,30 +97,28 @@ class SKU {
if (item.craftable === false) {
sku += ';uncraftable';
}
if (item.wear !== null) {
if (item.wear) {
sku += `;w${item.wear}`;
}
if (item.paintkit !== null) {
if (item.paintkit) {
sku += `;pk${item.paintkit}`;
}
if (item.quality2 !== null) {
if (item.quality2 == 11) {
sku += ';strange';
}
if (item.quality2 == 11) {
sku += ';strange';
}
if (item.killstreak !== 0) {
if (typeof item.killstreak === 'number' && item.killstreak !== 0) {
sku += `;kt-${item.killstreak}`;
}
if (item.target !== null) {
if (item.target) {
sku += `;td-${item.target}`;
}
if (item.festive === true) {
sku += ';festive';
}
if (item.craftnumber !== null) {
if (item.craftnumber) {
sku += `;n${item.craftnumber}`;
}
if (item.crateseries !== null) {
if (item.crateseries) {
sku += `;c${item.crateseries}`;
}

Expand Down

0 comments on commit 1af04ab

Please sign in to comment.