-
-
Notifications
You must be signed in to change notification settings - Fork 2
Home
A Node.js wrapper for Team Fortress 2's Unusual particle effects.
When you require()
the module, the isUnusual
, getAllEffects
, getEffectById
, getEffectByName
, getEffectsByType
, getEffectsBySeries
and getEffectFromObject
functions are returned.
This page lists all parameters and types available for each function.
However, you can also require individual functions and types exported by the module using destructuring.
Below is a CommonJS
example:
// Only require the getEffectByName function
const { getEffectByName} = require('unusual-effects');
A list of exported functions and types is available here.
Most of the functions use primitive JavaScript types, however, a few use custom interfaces to represent objects and have been made available through TypeScript imports.
Check if a String or Number is an Unusual effect.
-
effect
- Any Unusual effect name or id.
Returns true if the specified effect
matches any known Unusual effect, otherwise, false.
Get all the Unusual effects currently available in-game.
Returns an array of Unusual effect objects.
Get the Unusual effect whose id
property matches the specified string or number.
-
id
- Theid
of the Unusual effect.
Returns an Unusual effect object matching the specified id
, or null if no matching Unusual was found.
Get the Unusual effect whose name
property matches the specified string.
-
effect
- Thename
of the Unusual effect.
Returns an Unusual effect object matching the specified effect
, or null if no matching Unusual was found.
Get all the Unusual effects whose type
property matches the specified string.
-
type
- Thetype
of in-game item that an Unusual effect is associated with.
Returns an array of Unusual effect objects matching the specified type
.
Get all the Unusual effects whose series
property matches the specified string.
-
series
- The series of crates or cases that an Unusual effect is associated with.
Returns an array of Unusual effect objects matching the specified series
.
Get an Unusual effect from an EconItem
object.
-
item
- AnEconItem
object that represents an item within the Steam economy.
Returns an Unusual effect object matching the specified item
, or null if no matching Unusual was found.
For now, there are some examples available in the test directory.
Feel free to create an issue if you need to report any bugs or have a suggestion for a new feature.