Socket
Socket
Sign inDemoInstall

@xyo-network/crypto-nft-score-model

Package Overview
Dependencies
Maintainers
0
Versions
245
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xyo-network/crypto-nft-score-model - npm Package Compare versions

Comparing version 2.97.0 to 2.97.1

37

dist/browser/index.js

@@ -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

8

package.json

@@ -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

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