API Reference
Complete API documentation for all libraries in the dasch.ng monorepo, automatically generated from TypeScript/JSDoc comments.
Angular Libraries
Gravatar
Generate Gravatar hashes and URLs for Angular applications.
Main exports:
GravatarService- Service for generating Gravatar URLsGravatarDirective- Directive for adding Gravatar imageshashEmail()- Function to hash email addresses
JSON Viewer
Interactive JSON viewer component with syntax highlighting and circular reference detection.
Main exports:
JsonViewerComponent- Standalone component for displaying JSON dataSegment- Interface representing a key-value pair in the treeSegmentType- Type alias for different value types
Key features:
- 🌲 Interactive tree view with expand/collapse
- 🎨 Type-specific syntax highlighting
- 🔄 Automatic circular reference detection
- 📦 Standalone component (no module required)
- 🚀 Signal-based inputs for optimal performance
NG Utils
Angular utilities including pipes, directives, and helper functions.
Main exports:
IsNullPipe,IsNilPipe,IsUndefinedPipe- Type-checking pipesReversePipe- Reverse arrays- Helper functions for Angular applications
Material Right Sheet
Angular Material right-side sheet component.
Main exports:
MatRightSheet- Service to open right-side sheetsMatRightSheetRef- Reference to an opened sheetMatRightSheetConfig- Configuration options
Mutation Observer
Angular wrapper for the MutationObserver API.
Main exports:
MutationObserverService- Service for observing DOM mutationsObserveMutationDirective- Directive for mutation observation
Resize Observer
Angular wrapper for the ResizeObserver API.
Main exports:
ResizeObserverService- Service for observing element resizing
Validators
Form validators for Angular applications.
Main exports:
- Various form validation functions
- Custom validators for common scenarios
TypeScript Libraries
Decorators
Useful TypeScript decorators for common patterns.
Main exports:
@Debounce()- Debounce method calls@Memoize()- Cache function results@LogGroup(),@Measure()- Logging and performance measurement
RxJS Operators
Custom RxJS operators for reactive programming.
Main exports:
filterNil()- Filter out null/undefined valuesfilterEmpty()- Filter out empty stringstapCatch()- Combine tap and catchErrordebugOperator()- Debug observable streams
Web Utils
Web utilities for SVG conversion, downloads, and file handling.
Main exports:
convertSvgToImage()- Convert SVG strings to raster images (PNG/JPEG)download()- Trigger browser downloads for filescreateFileArray()- Normalize File/FileList to array
How to Read the API Documentation
Each module's documentation includes:
- Functions: Full function signatures with parameter types and return types
- Classes: All public methods and properties
- Interfaces: TypeScript interface definitions
- Type Aliases: Custom type definitions
- Examples: Usage examples from JSDoc comments
Documentation Format
The API documentation is generated using TypeDoc from TypeScript source code and JSDoc comments. All public APIs include:
- @param - Parameter descriptions and types
- @returns - Return type descriptions
- @example - Usage examples
- @template - Generic type parameters
Contributing to Documentation
To improve the API documentation:
- Add or update JSDoc comments in the source code
- Include
@param,@returns, and@exampletags - Run
npx typedocto regenerate the docs - Verify the output in
apps/docs/api/
Example JSDoc comment:
/**
* Filters out null and undefined values from the stream.
*
* @template T - The type of values emitted by the source observable
* @returns An operator function that filters out null and undefined values
*
* @example
* ```typescript
* of(1, null, 2, undefined, 3)
* .pipe(filterNil())
* .subscribe(console.log);
* // Output: 1, 2, 3
* ```
*/
export function filterNil<T>() {
// implementation
}