@xyo-network/crypto-nft-score-model
Advanced tools
Comparing version 2.97.0 to 2.97.1
@@ -1,2 +0,37 @@ | ||
var n=(e,o=1)=>(e[0]+=o,e),l=(e,o=1)=>(e[1]+=o,e),a=(e,o=1,r=1)=>(e[0]+=o,e[1]+=r,e);var s=[1,1],i=[0,1],c=[0,0];var u=(e,o)=>{let[r,t]=e;return t===0?c:[Math.min(Math.round(r/t*o),o),o]};export{i as FAIL,s as PASS,c as SKIP,l as incrementPossible,n as incrementTotal,a as incrementTotalAndPossible,u as normalize}; | ||
// src/increment.ts | ||
var incrementTotal = (score, by = 1) => { | ||
score[0] += by; | ||
return score; | ||
}; | ||
var incrementPossible = (score, by = 1) => { | ||
score[1] += by; | ||
return score; | ||
}; | ||
var incrementTotalAndPossible = (score, totalBy = 1, possibleBy = 1) => { | ||
score[0] += totalBy; | ||
score[1] += possibleBy; | ||
return score; | ||
}; | ||
// src/score.ts | ||
var PASS = [1, 1]; | ||
var FAIL = [0, 1]; | ||
var SKIP = [0, 0]; | ||
// src/normalize.ts | ||
var normalize = (score, maxScore) => { | ||
const [total, possible] = score; | ||
if (possible === 0) return SKIP; | ||
const normalizedScore = Math.min(Math.round(total / possible * maxScore), maxScore); | ||
return [normalizedScore, maxScore]; | ||
}; | ||
export { | ||
FAIL, | ||
PASS, | ||
SKIP, | ||
incrementPossible, | ||
incrementTotal, | ||
incrementTotalAndPossible, | ||
normalize | ||
}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,37 @@ | ||
var n=(e,o=1)=>(e[0]+=o,e),l=(e,o=1)=>(e[1]+=o,e),a=(e,o=1,r=1)=>(e[0]+=o,e[1]+=r,e);var s=[1,1],i=[0,1],c=[0,0];var u=(e,o)=>{let[r,t]=e;return t===0?c:[Math.min(Math.round(r/t*o),o),o]};export{i as FAIL,s as PASS,c as SKIP,l as incrementPossible,n as incrementTotal,a as incrementTotalAndPossible,u as normalize}; | ||
// src/increment.ts | ||
var incrementTotal = (score, by = 1) => { | ||
score[0] += by; | ||
return score; | ||
}; | ||
var incrementPossible = (score, by = 1) => { | ||
score[1] += by; | ||
return score; | ||
}; | ||
var incrementTotalAndPossible = (score, totalBy = 1, possibleBy = 1) => { | ||
score[0] += totalBy; | ||
score[1] += possibleBy; | ||
return score; | ||
}; | ||
// src/score.ts | ||
var PASS = [1, 1]; | ||
var FAIL = [0, 1]; | ||
var SKIP = [0, 0]; | ||
// src/normalize.ts | ||
var normalize = (score, maxScore) => { | ||
const [total, possible] = score; | ||
if (possible === 0) return SKIP; | ||
const normalizedScore = Math.min(Math.round(total / possible * maxScore), maxScore); | ||
return [normalizedScore, maxScore]; | ||
}; | ||
export { | ||
FAIL, | ||
PASS, | ||
SKIP, | ||
incrementPossible, | ||
incrementTotal, | ||
incrementTotalAndPossible, | ||
normalize | ||
}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,37 @@ | ||
var n=(e,o=1)=>(e[0]+=o,e),l=(e,o=1)=>(e[1]+=o,e),a=(e,o=1,r=1)=>(e[0]+=o,e[1]+=r,e);var s=[1,1],i=[0,1],c=[0,0];var u=(e,o)=>{let[r,t]=e;return t===0?c:[Math.min(Math.round(r/t*o),o),o]};export{i as FAIL,s as PASS,c as SKIP,l as incrementPossible,n as incrementTotal,a as incrementTotalAndPossible,u as normalize}; | ||
// src/increment.ts | ||
var incrementTotal = (score, by = 1) => { | ||
score[0] += by; | ||
return score; | ||
}; | ||
var incrementPossible = (score, by = 1) => { | ||
score[1] += by; | ||
return score; | ||
}; | ||
var incrementTotalAndPossible = (score, totalBy = 1, possibleBy = 1) => { | ||
score[0] += totalBy; | ||
score[1] += possibleBy; | ||
return score; | ||
}; | ||
// src/score.ts | ||
var PASS = [1, 1]; | ||
var FAIL = [0, 1]; | ||
var SKIP = [0, 0]; | ||
// src/normalize.ts | ||
var normalize = (score, maxScore) => { | ||
const [total, possible] = score; | ||
if (possible === 0) return SKIP; | ||
const normalizedScore = Math.min(Math.round(total / possible * maxScore), maxScore); | ||
return [normalizedScore, maxScore]; | ||
}; | ||
export { | ||
FAIL, | ||
PASS, | ||
SKIP, | ||
incrementPossible, | ||
incrementTotal, | ||
incrementTotalAndPossible, | ||
normalize | ||
}; | ||
//# sourceMappingURL=index.js.map |
@@ -14,7 +14,7 @@ { | ||
"@xylabs/object": "^3.5.1", | ||
"@xyo-network/payload-model": "^2.107.0" | ||
"@xyo-network/payload-model": "^2.107.4" | ||
}, | ||
"devDependencies": { | ||
"@xylabs/ts-scripts-yarn3": "^3.11.8", | ||
"@xylabs/tsconfig": "^3.11.8", | ||
"@xylabs/ts-scripts-yarn3": "^3.11.10", | ||
"@xylabs/tsconfig": "^3.11.10", | ||
"typescript": "^5.5.2" | ||
@@ -61,4 +61,4 @@ }, | ||
"sideEffects": false, | ||
"version": "2.97.0", | ||
"version": "2.97.1", | ||
"type": "module" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
66658
412
0