Helpers
Understand how to use all the Athenna Helpers from @athenna/common and other packages.
Introduction
Athenna includes a variety of "helpers" classes inside
the @athenna/common
package that comes by default
installed in your application. Many of these classes are
used by the framework itself; however, you are free to use
them in your own applications if you find them convenient.
Available helpers
Clean
- Remove falsy values from different data structures.Color
- The UI Kit of Athenna command line applications.Enum
- Create enums with helper methods to retrieve keys, values and more.Exception
- Create errors with more details to handle them easily.Exec
- Simple helpers that executes some operation, like executing a command in a child process.FakeApi
- Create a fake REST API usingjson
files to map the routes and their returns (similiar to WireMock).File
- Create, copy, move, delete and get information about files.Folder
- Create, copy, move, delete and get information about folders.Globals
- Execute global helpers exposed by Athenna.HttpClient
- Make HTTP requests for other servers with a human-friendly and powerful API.HttpClientBuilder
- Build requests using builder pattern instead of creating options as objects.Is
- Validate if your data is equals to some type or pattern.Json
- Simple helpers to manipulate JSON.Module
- Simple helpers to manipulate Node.js modules.Number
- Simple helpers to manipulate numbers.ObjectBuilder
- Build objects removingundefined
andnull
values and without memory reference.Options
- Simple helpers to develop API's (functions and methods) with good options and configurations for developers.Parser
- Parse data from X to Y and Y to X.Path
- Get the full path to some file or folder starting from your application PWD.Route
- Simple helpers to manipulate route params, query params and more.String
- Simple helpers to manipulate strings.Uuid
- Create customized UUID v4 and validate if they are valid.