From becca88c4289642dc7f75bd90ddedb3504d21c49 Mon Sep 17 00:00:00 2001 From: slippyvex Date: Fri, 19 Apr 2024 23:05:06 +0200 Subject: [PATCH] bumped version to 1.0.4 --- example/example-usage.ts | 2 +- package.json | 2 +- src/index.ts | 1 + src/lib/RarityScorer.ts | 2 +- tsconfig.json | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/example/example-usage.ts b/example/example-usage.ts index d0a1b8c..ef3ef69 100644 --- a/example/example-usage.ts +++ b/example/example-usage.ts @@ -1,4 +1,4 @@ -import { AssetBase, IEquationOptions } from '../src/@types'; +import { AssetBase, IEquationOptions } from '../src'; import { calculateRanking } from '../src'; const assets: AssetBase[] = [ diff --git a/package.json b/package.json index 06090ff..4ab60bd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lsp8.app.rarity-lib", - "version": "1.0.1", + "version": "1.0.4", "description": "Tiny, zero-dependencies, package which tries to calculate rarity and rankings for a given NFT 2.0 LSP8 asset collection", "main": ".build/src/index.js", "files": [ diff --git a/src/index.ts b/src/index.ts index a760bfb..a68d274 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,2 +1,3 @@ export * from './lib/RarityScorer'; export { calculateRanking } from './lib/calculateRanking'; +export * from './@types'; diff --git a/src/lib/RarityScorer.ts b/src/lib/RarityScorer.ts index 1e1f64d..e2fbde0 100644 --- a/src/lib/RarityScorer.ts +++ b/src/lib/RarityScorer.ts @@ -138,7 +138,7 @@ export class RarityScorer { }, 0); } - private assignRanks(rarityScores: IRarityScore[]): IRarityScore[] { + public assignRanks(rarityScores: IRarityScore[]): IRarityScore[] { rarityScores.sort((a, b) => b.score - a.score); if (!this.nonUniqueRanking) { diff --git a/tsconfig.json b/tsconfig.json index 32687b0..480b8cb 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,7 +11,7 @@ "moduleResolution": "node", "resolveJsonModule": true, "sourceMap": true, - "outDir": ".build/src", + "outDir": ".build", "baseUrl": ".", "paths": { "*": ["node_modules/*", "src/@types/*"]