Releases: Sv443-Network/SvCoreLib
Releases · Sv443-Network/SvCoreLib
Version 1.18.2
Version 1.18.1
Fixes:
- Fix some TS typings
Version 1.18.0
Version 1.17.0
- Additions
- Added function
allInstanceOf()
to check if all items in an array are an instance of a class - Added function
isClass()
to check if a value is a reference to a class - Added function
randomItemIndex()
to get a random item and its index from an array - Added function
takeRandomItem()
to delete a random item from an array and return it - colors
- Added
colors.fgb
andcolors.bgb
for bright colors - Added
dim
,underscore
,reverse
andhidden
- Added
- Added function
- Breaking changes
- Changed state
fulfilled
toresolved
in StatePromise - colors
- Removed brightness modifier from
colors.fg
andcolors.bg
- Renamed
colors.fat
tocolors.bright
- Removed brightness modifier from
- Changed state
- Fixes
- Added missing documentation for
allOfType()
- Fixed docs in various places
- Added missing documentation for
Version 1.16.0
- Additions
- Added clamp() to ensure a number is between a min and max limit
- Fixes
- randRange() now doesn't depend on the
performance
module anymore - Updated deps
- randRange() now doesn't depend on the
Version 1.15.0
- Breaking changes
- Shortened namespace names:
generateUUID
->uuid
filesystem
->files
- Renamed functions:
seededRNG.generateRandomSeed()
->seededRNG.randomSeed()
seededRNG.generateRandomNumbers()
->seededRNG.generateNumbers()
pause()
->system.pause()
- Shortened namespace names:
- Additions
- Added function
halves()
to get the two halves of an array - Added function
parseDuration()
to parse out time units from a passed duration in milliseconds - Added function
formatDuration()
to convert a duration in milliseconds to a string with custom format - Added function
files.existsSync()
as a synchronous counterpart tofiles.exists()
SelectionMenu
now supports EventEmitter's.on("submit")
method
- Added function
- Fixes
Version 1.14.2
Hotfix 1.14.1
Fixed bug where filesystem.exists()
wasn't exported (see #25)
Release 1.14.0
- Additions
- Added class
StatePromise
that keeps track of the state of a promise - Added single-parameter overload to
randRange()
- Added string array overload to
generateUUID.custom()
, deprecated older overload softShutdown()
now accepts a Promise for async code execution before shutdown
- Added class
- Changes
- Moved repository to @Sv443-Network
- Improved type declaration file (
.d.ts
) by a lot
- Security
- Audited dependencies
Release 1.13.0
Migration warnings:
- You will need to modify all occurrences of
FolderDaemon
with the new syntax shown in the docs - The namespace of a few functions has changed (see changes)
Added functions:
filesystem.exists()
to provide a reimplementation tofs
' deprecatedexists()
function (#14)filesystem.ensureDirs()
to ensure a set of directories exists (#18)filesystem.ensureDirsSync()
as a synchronous counterpart toensureDirs()
(#18)system.usedHeap()
to get the current heap usage in percent (#19)
Changes:
- Replaced
FolderDaemon
's configuration parameters with a single settings object (#13) - Added base class
SCLError
to all errors to implement thedate
property (#17) - Moved a few functions to the new
system
namespace:noShutdown()
- moved tosystem
yesShutdown()
- moved tosystem
softShutdown()
- moved tosystem
inDebugger()
- moved tosystem
setWindowTitle()
- moved tosystem