A suite of Angular libraries that helps you build secure, browser-integrated applications with a clean developer experience.
Advanced regular expression security and ReDoS prevention
π Documentation: https://gaspar1992.github.io/angular-helpers/docs/security
π― What it solves:
- ReDoS (Regular Expression Denial of Service) attacks caused by malicious or expensive patterns.
- Safe validation of complex regular expressions without blocking your app.
- Controlled regex execution with timeout and security analysis.
β¨ Key features:
- π‘οΈ ReDoS prevention with automatic risky pattern checks.
- β‘ Web Worker execution to avoid blocking the main thread.
- π Configurable timeout to limit expensive regex operations.
- π Risk analysis with complexity metrics and recommendations.
- ποΈ Builder pattern for fluent secure-regex configuration.
π‘ Example usage:
// Safe regex validation for user input
const result = await securityService.testRegex(userInput, text, {
timeout: 5000,
safeMode: true,
});
// Builder pattern for complex patterns
const { pattern, security } = RegexSecurityService.builder()
.pattern('\\d+')
.timeout(3000)
.safeMode()
.build();π₯ Installation:
npm install @angular-helpers/securityUnified and safe browser API access with permissions and robust error handling
π Documentation: https://gaspar1992.github.io/angular-helpers/docs/browser-web-apis
π― What it solves:
- API fragmentation across browsers.
- Permission complexity for sensitive browser features.
- Compatibility checks that usually require repetitive boilerplate.
- Inconsistent error handling across web APIs.
β¨ Key features:
- πΈ Camera access and stream control.
- πΊοΈ Geolocation with watch support and typed errors.
- π Notifications with permission-aware behavior.
- π Clipboard utilities.
- π₯ Media Devices enumeration and media access.
- π Centralized permission utilities.
- β Device/browser API wrappers with fallback checks.
- β‘ Signal Fn primitives β 9 zero-boilerplate reactive inject functions (
injectPageVisibility,injectResizeObserver,injectIntersectionObserver,injectNetworkInformation,injectScreenOrientation,injectMutationObserver,injectPerformanceObserver,injectIdleDetector,injectGamepad) with automatic cleanup andviewChildsignal support.
π₯ Installation:
npm install @angular-helpers/browser-web-apisAngular HTTP over Web Workers β off-main-thread HTTP pipelines
π― What it solves:
- Main-thread blocking from heavy HTTP payloads and serialization.
- Request signing complexity with WebCrypto HMAC.
- Serialization overhead with pluggable format support.
β¨ Key features:
- π Off-main-thread HTTP pipelines via Web Workers.
- π Typed RPC bridge for structured worker communication.
- π WebCrypto HMAC request signing.
- π¦ Pluggable serializers (TOON, seroval, auto-detect).
β οΈ This package is in preview. APIs may change before v1.0.
π₯ Installation:
npm install @angular-helpers/worker-http- Unified APIs for common browser capabilities.
- Strict TypeScript support and better autocomplete.
- Practical examples and ready-to-use patterns.
- End-to-end browser test coverage in CI.
- ReDoS prevention tools for regex-heavy flows.
- Permission-aware wrappers for sensitive APIs.
- Worker-based isolation for expensive operations.
- Predictable error handling paths.
- Built for modern Angular versions and patterns.
- Browser-focused utilities tested with Playwright.
- Actively maintained workflows and test harnesses.
# Clone the repository
git clone https://github.com/Gaspar1992/angular-helpers
cd angular-helpers
# Install dependencies
npm install
# Generate local SSL certificates
npm run ssl:generate
# Start demo app over HTTPS
npm run start:https# Install the packages you need
npm install @angular-helpers/security
npm install @angular-helpers/browser-web-apis
npm install @angular-helpers/worker-http # previewFor modern Angular standalone integration, check each package's own README.
| Feature | Angular Helpers | Manual Implementation | Other Libraries |
|---|---|---|---|
| ReDoS Protection | β Built-in | β Manual | |
| Browser APIs | β Unified | β Fragmented | |
| TypeScript | β Full support | β Minimal | |
| Testing | β Included | β Manual | |
| Documentation | β Comprehensive | β Missing | |
| Support | β Active | β Team-owned only |
# Generate SSL certificates (local/CI)
npm run ssl:generate
# Local HTTPS development (required for secure browser APIs)
npm run start:https
# Build all packages
npm run build:packages
# Browser tests on Chromium
npm run test:browser
# Browser tests for CI (Chromium, 1 worker)
npm run test:browser:ci
# Cross-browser smoke tests (Firefox + WebKit)
npm run test:browser:cross
# Workspace linting
npm run lintangular-helpers/
βββ packages/
β βββ security/ # π¦ @angular-helpers/security
β βββ browser-web-apis/ # π¦ @angular-helpers/browser-web-apis
β βββ worker-http/ # π¦ @angular-helpers/worker-http (preview)
βββ src/ # π Demo application
βββ docs/ # π Documentation
βββ scripts/ # π§ Automation scripts
- @angular-helpers/pwa - Service Worker and PWA capabilities.
- @angular-helpers/storage - Unified storage helpers.
- @angular-helpers/worker-http β transport, serializer, backend, interceptors, and crypto sub-entry points.
- Runtime and bundle-size improvements.
- More real-world examples and demos.
Contributions are welcome.
# Fork and clone
git clone https://github.com/your-user/angular-helpers
# or fork from https://github.com/Gaspar1992/angular-helpers
cd angular-helpers
# Create a feature branch
git checkout -b feature/your-feature
# Commit and push
git commit -m "feat: add your feature"
git push origin feature/your-featureMIT License β see LICENSE for details.
- π Issues & Feature Requests: GitHub Issues
- π¬ Discussions: GitHub Discussions
- π¦ NPM Organization: npmjs.com/org/angular-helpers
β If Angular Helpers helps your team, consider starring the repository.
Made with β€οΈ by the Angular Helpers Team