Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
tf2-currency
Advanced tools
Set of tools that manage operations with tf2 currency. Inspired by tf2-currencies made by Nicklason. Made as a drop in replacement for your plain currency object.
npm install tf2-currency
or via yarn yarn add tf2-currency
Following classes, types and functions are exported:
export {
Currency, // Currency class that manages operations
CurrencyError, // Error thrown by Currency class
ICurrency, // Interface for currency
c, // Create Currency object faster
fixCurrency, // Fix partial currency objects
}
currency
represents plain currency object such as { keys: 12, metal: 52.11 }
Creates a Currency class from scrap value
scrap
value you are creating currency fromconversion
rate to be used to convert into keysCreates a Currency class from key value
keys
floating point number to create currency fromconversion
rate to be used to convert into metal
Converts currency to scrap
conversion
to convert keys to scrap
Converts currency to keys
conversion
to convert metal to keys
Builds a currency string readable for humans
Returns plain currency object for json serialization
Adds scrap value to the currency
scrap
value you are adding to the currencyconversion
rate to be used to convert exceeding metal value into keysAdds metal value to the currency
metal
value you are adding to the currencyconversion
rate to be used to convert exceeding metal value into keysAdds key value to the currency
keys
value you are adding to the currencyconversion
rate to be used to convert exceeding metal value into keys
Adds currency value to the currency
currency
value you are adding to the currencyconversion
rate to be used to convert exceeding metal value into keysRemoves scrap value from the currency
scrap
value you are removing from the currencyconversion
rate to be used to convert key into scrap
Removes metal value from the currency
metal
value you are removing from the currencyconversion
rate to be used to convert key into metal
Removes key value from the currency
keys
value you are removing from the currencyconversion
rate to be used to convert key decimal to metal
Removes currency value from the currency
currency
value you are removing from the currencyconversion
rate to be used to convert key into metal
Compares current currency object with supplied one
currency
we are comparing toCompares current currency object with supplied one
currency
we are comparing toCompares current currency object with supplied one
currency
we are comparing toCompares current currency object with supplied one
currency
we are comparing toCompares current currency object with supplied one
currency
we are comparing toCreates Currency
object
currency
from which we are creating the objectFixes partial currency
object
currency
we are fixingFAQs
Set of tools that manage operations with tf2 currency.
The npm package tf2-currency receives a total of 102 weekly downloads. As such, tf2-currency popularity was classified as not popular.
We found that tf2-currency demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.