Angular Helpers
  • Docs
  • Demo
  • Blog
Angular Helpers AH
πŸ“¦Core🌐Browser Web APIsπŸ›‘οΈSecurityπŸš€Worker HTTPπŸ’ΎStorageπŸ—ΊοΈOpenLayers
πŸ“¦Core
πŸ“‹Overview
Platform
  • injectPlatformFN
Workers
  • isTransferableFN
  • WorkerPool
docs/Core

core

npm

Shared primitives used across all Angular Helpers packages β€” platform detection, Transferable helpers, and Worker pooling.

TypeScriptmain.ts
import { injectPlatform, injectWorkerPool, isTransferable } from '@angular-helpers/core';
  
  // No provider setup required β€” all utilities are standalone inject() functions.
  // pnpm add @angular-helpers/core

πŸ–₯️
Platform

injectPlatform

[v21 Legacy] Composable that resolves the current platform environment using Angular's Dependency Injection. Returns a typed object with `isBrowser`, `isServer`, `window`, and `document` fields. Gracefully falls back when called outside an injection context (e.g. unit tests).

Explore API→

βš™οΈ
Workers & Transferables

isTransferable

Pure predicate that returns `true` if a value is a `Transferable` instance that can be moved zero-copy via `postMessage`. Guards every Transferable type with a `typeof` check so it is safe in Web Workers, Node.js, and SSR contexts where some globals may be absent.

Explore API→

WorkerPool / injectWorkerPool

Manages a pool of Web Workers with round-robin job dispatch. `injectWorkerPool` is the DI-aware factory that automatically terminates all workers when the injection context is destroyed. Used internally by `@angular-helpers/security` to run ReDoS-safe regex operations off the main thread.

Explore API→