@poprank/rankings
Advanced tools
Comparing version 1.1.16 to 1.1.17
@@ -76,2 +76,7 @@ "use strict"; | ||
var outTraits = []; | ||
var baseOutTrait = { | ||
category: 'Meta', | ||
typeValue: 'Special', | ||
displayType: null, | ||
}; | ||
// Palindrome (ABA, ABBA, ABABA, AABAA) trait | ||
@@ -90,8 +95,3 @@ var isPalindrome = true; | ||
if (isPalindrome) { | ||
outTraits.push({ | ||
value: 'Palindrome', | ||
category: 'Meta', | ||
typeValue: 'Special', | ||
displayType: null, | ||
}); | ||
outTraits.push(__assign(__assign({}, baseOutTrait), { value: 'Palindrome' })); | ||
} | ||
@@ -108,8 +108,3 @@ // Prime trait | ||
if (isPrime) { | ||
outTraits.push({ | ||
value: 'Prime', | ||
category: 'Meta', | ||
typeValue: 'Special', | ||
displayType: null, | ||
}); | ||
outTraits.push(__assign(__assign({}, baseOutTrait), { value: 'Prime' })); | ||
} | ||
@@ -119,8 +114,3 @@ // Fibonacci trait | ||
if (isFibonacci) { | ||
outTraits.push({ | ||
value: 'Fibonacci', | ||
category: 'Meta', | ||
typeValue: 'Special', | ||
displayType: null, | ||
}); | ||
outTraits.push(__assign(__assign({}, baseOutTrait), { value: 'Fibonacci' })); | ||
} | ||
@@ -138,8 +128,3 @@ // Alternating trait | ||
if (isAlternating) { | ||
outTraits.push({ | ||
value: 'Alternating', | ||
category: 'Meta', | ||
typeValue: 'Special', | ||
displayType: null, | ||
}); | ||
outTraits.push(__assign(__assign({}, baseOutTrait), { value: 'Alternating' })); | ||
} | ||
@@ -155,8 +140,3 @@ // Double (0331, 0013, 3122, etc) trait | ||
if (isDouble) { | ||
outTraits.push({ | ||
value: 'Double', | ||
category: 'Meta', | ||
typeValue: 'Special', | ||
displayType: null, | ||
}); | ||
outTraits.push(__assign(__assign({}, baseOutTrait), { value: 'Double' })); | ||
} | ||
@@ -170,38 +150,29 @@ // Double (3311, 03311, etc) Pair trait | ||
if (isDoublePair) { | ||
outTraits.push({ | ||
value: 'Double Pair', | ||
category: 'Meta', | ||
typeValue: 'Special', | ||
displayType: null, | ||
}); | ||
outTraits.push(__assign(__assign({}, baseOutTrait), { value: 'Double Pair' })); | ||
} | ||
} | ||
// Birthday trait | ||
var isBirthday = false; | ||
if (digits === 4) { | ||
var day = +stringifiedId.slice(0, 2); | ||
var month = +stringifiedId.slice(2, 4); | ||
var isBirthday = month >= 1 && month <= 12 && day >= 1 && day <= exports.DAYS_IN_MONTH[month]; | ||
isBirthday = month >= 1 && month <= 12 && day >= 1 && day <= exports.DAYS_IN_MONTH[month]; | ||
if (isBirthday) { | ||
outTraits.push({ | ||
value: 'Birthday', | ||
category: 'Meta', | ||
typeValue: 'Special', | ||
displayType: null, | ||
}); | ||
outTraits.push(__assign(__assign({}, baseOutTrait), { value: 'Birthday' })); | ||
} | ||
} | ||
// Birthday (US) trait | ||
var isUSBirthday = false; | ||
if (digits === 4) { | ||
var usMonth = +stringifiedId.slice(0, 2); | ||
var usDay = +stringifiedId.slice(2, 4); | ||
var isUSBirthday = usMonth >= 1 && usMonth <= 12 && usDay >= 1 && usDay <= exports.DAYS_IN_MONTH[usMonth]; | ||
isUSBirthday = usMonth >= 1 && usMonth <= 12 && usDay >= 1 && usDay <= exports.DAYS_IN_MONTH[usMonth]; | ||
if (isUSBirthday) { | ||
outTraits.push({ | ||
value: 'Birthday (US)', | ||
category: 'Meta', | ||
typeValue: 'Special', | ||
displayType: null, | ||
}); | ||
outTraits.push(__assign(__assign({}, baseOutTrait), { value: 'Birthday (US)' })); | ||
} | ||
} | ||
// Birthday (Global) trait | ||
if (isBirthday && isUSBirthday) { | ||
outTraits.push(__assign(__assign({}, baseOutTrait), { value: 'Birthday (Global)' })); | ||
} | ||
// Triple (333, 3331, 33311, etc) trait | ||
@@ -214,8 +185,3 @@ var isTriple = false; | ||
if (isTriple) { | ||
outTraits.push({ | ||
value: 'Triple', | ||
category: 'Meta', | ||
typeValue: 'Special', | ||
displayType: null, | ||
}); | ||
outTraits.push(__assign(__assign({}, baseOutTrait), { value: 'Triple' })); | ||
} | ||
@@ -230,8 +196,3 @@ // Quadruple (3333, 33331, etc) trait | ||
if (isQuadruple) { | ||
outTraits.push({ | ||
value: 'Quadruple', | ||
category: 'Meta', | ||
typeValue: 'Special', | ||
displayType: null, | ||
}); | ||
outTraits.push(__assign(__assign({}, baseOutTrait), { value: 'Quadruple' })); | ||
} | ||
@@ -246,8 +207,3 @@ } | ||
if (isQuintuple) { | ||
outTraits.push({ | ||
value: 'Quintuple', | ||
category: 'Meta', | ||
typeValue: 'Special', | ||
displayType: null, | ||
}); | ||
outTraits.push(__assign(__assign({}, baseOutTrait), { value: 'Quintuple' })); | ||
} | ||
@@ -262,8 +218,3 @@ } | ||
}; | ||
outTraits.push({ | ||
value: values[digits], | ||
category: 'Meta', | ||
typeValue: 'Special', | ||
displayType: null, | ||
}); | ||
outTraits.push(__assign(__assign({}, baseOutTrait), { value: values[digits] })); | ||
} | ||
@@ -273,8 +224,3 @@ // Square number | ||
if (isSquare) { | ||
outTraits.push({ | ||
value: 'Square (^2)', | ||
category: 'Meta', | ||
typeValue: 'Special', | ||
displayType: null, | ||
}); | ||
outTraits.push(__assign(__assign({}, baseOutTrait), { value: 'Square (^2)' })); | ||
} | ||
@@ -284,8 +230,3 @@ // Cube number | ||
if (isCube) { | ||
outTraits.push({ | ||
value: 'Cube (^3)', | ||
category: 'Meta', | ||
typeValue: 'Special', | ||
displayType: null, | ||
}); | ||
outTraits.push(__assign(__assign({}, baseOutTrait), { value: 'Cube (^3)' })); | ||
} | ||
@@ -297,8 +238,3 @@ // Was the ENS registered before the punk mint date | ||
if (isPrePunk) { | ||
outTraits.push({ | ||
value: 'Pre Punk', | ||
category: 'Meta', | ||
typeValue: 'Special', | ||
displayType: null, | ||
}); | ||
outTraits.push(__assign(__assign({}, baseOutTrait), { value: 'Pre Punk' })); | ||
} | ||
@@ -305,0 +241,0 @@ return outTraits; |
{ | ||
"name": "@poprank/rankings", | ||
"version": "1.1.16", | ||
"version": "1.1.17", | ||
"description": "PopRank's NFT rarity and aesthetic ranking logic", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
Sorry, the diff of this file is not supported yet
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
58920
782