@pancakeswap/swap-sdk-core
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -466,2 +466,13 @@ 'use strict'; | ||
} | ||
function sortCurrencies(currencies) { | ||
return currencies.sort((a, b) => { | ||
if (a.isNative) { | ||
return -1; | ||
} | ||
if (b.isNative) { | ||
return 1; | ||
} | ||
return a.sortsBefore(b) ? -1 : 1; | ||
}); | ||
} | ||
@@ -494,4 +505,5 @@ exports.BaseCurrency = BaseCurrency; | ||
exports.getTokenComparator = getTokenComparator; | ||
exports.sortCurrencies = sortCurrencies; | ||
exports.sortedInsert = sortedInsert; | ||
exports.sqrt = sqrt; | ||
exports.validateVMTypeInstance = validateVMTypeInstance; |
@@ -18,2 +18,3 @@ import { VMType } from './constants'; | ||
}): (tokenA: Token, tokenB: Token) => number; | ||
export declare function sortCurrencies<T extends Currency>(currencies: T[]): T[]; | ||
//# sourceMappingURL=utils.d.ts.map |
{ | ||
"name": "@pancakeswap/swap-sdk-core", | ||
"license": "MIT", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "🛠 An SDK for building applications on top of Pancakeswap.", | ||
@@ -6,0 +6,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
58285
1252
1