The main goal is to include several general purpose functionality, mainly related to functional programming, in a common Angular project.
Below is shown a brief introduction to the functionality included in this one:
New types providing generic functionality like:
- Comparator comparison function, which imposes a total ordering on some collection of objects.
- Consumer represents an operation that accepts zero or more input arguments and returns no result.
- Generic subject wrapper of RxJS Subject adding several customizations.
Others related with functional programming:
- Either represents a value of one of two possible types (a disjoint union).
- Function represents an operation that accepts zero or more input arguments and returns a result.
- Predicate represents an operation that accepts zero or more input arguments and returns a boolean result based on provided data.
- Optional a container object which may or may not contain a non-null value.
- Try computation representation that may either result in an error, or return a successfully computed value.
- Validation used to validate the given instance, defining 2 different status to manage the result:
ValidandInvalid.
There are new collections used to store, search, sort and organize data more easily - all using standardized methods and patterns:
- Set stores a collection of unique elements.
- MutableHashSet: unordered collection of unique elements based on hash function to locate internal elements. This Set can be updated, reduced or extended in place.
- MutableLinkedHashSet: collection of unique elements based on hash function to locate internal elements that maintains insertion order. This Set can be updated, reduced or extended in place.
- ImmutableHashSet: unordered collection of unique elements based on hash function to locate internal elements. This Set never change, that is, all the operations updating it will return a new Set and leave the old one unchanged.
- ImmutableLinkedHashSet: collection of unique elements based on hash function to locate internal elements that maintains insertion order. This Set never change, that is, all the operations updating it will return a new Set and leave the old one unchanged.
This project was generated using Angular CLI version 21.0.3.
To start a local development server, run:
ng serveOnce the server is running, open your browser and navigate to http://localhost:4200/. The application will automatically reload whenever you modify any of the source files.
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
ng generate component component-nameFor a complete list of available schematics (such as components, directives, or pipes), run:
ng generate --helpTo build the project run:
ng buildThis will compile your project and store the build artifacts in the dist/ directory. By default, the production build optimizes your application for performance and speed.
To execute unit tests with the Vitest test runner, use the following command:
ng testTo execute benchmarks with the Vitest benchmark runner, use the following command:
vitest benchFor end-to-end (e2e) testing, run:
ng e2eAngular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
For more information on using the Angular CLI, including detailed command references, visit the Angular CLI Overview and Command Reference page.
There are previous versions of this project located with other git branches different than main:
- 2.7.5 related with Angular 15 and TypeScript 4.9.