How barchart/common-js works
@barchart/common-js is a public, browser- and Node-compatible JavaScript utility library, not an application with one fixed end-to-end workflow. A consumer selects utilities for a task; the library supplies reusable language/date values, collections, predicates, serialization, messaging/models, command dispatch, HTTP/REST, and timing behavior. Groups reflect these runtime capabilities. Sampled source supports only the internal edges shown; other branches are retained from the README and file tree without assuming their wiring.
Main entry points: CommandHandler.js Command handlers · Event.js Events · DataType.js JSON data types · Day.js Date and time values
Components 21
Language and values
- Language utilities
lang - Date and time values
lang/Day.js - Numeric and currency values
lang/Decimal.js
Collections and rules
- Collections
collections - Specialized collections
collections/specialized - Specifications
specifications/Specification.js - JSON schemas
serialization/json/Schema.js - JSON data types
serialization/json/DataType.js
Interaction and transport
- Command handlers
commands/CommandHandler.js - Mapped dispatch
commands/MappedCommandHandler.js - Composite dispatch
commands/CompositeCommandHandler.js - Events
messaging/Event.js - Named events
messaging/EventMap.js - Observable models
models/Model.js - HTTP gateway
api/http/Gateway.js - REST providers
network/rest/RestProvider.js - REST parsing
network/rest/RestParser.js
Scheduling
- Scheduler
timing/Scheduler.js - Rate limiting
timing/RateLimiter.js - Serialized timing
timing/Serializer.js
Other components
- Library consumer
Connections 18
- Library consumer → Language utilities: uses
- Library consumer → Collections: uses
- Library consumer → Specifications: uses
- Library consumer → JSON schemas: uses
- Library consumer → Command handlers: uses
- Library consumer → Events: uses
- Library consumer → Observable models: uses
- Library consumer → HTTP gateway: uses
- Library consumer → REST providers: uses
- Library consumer → Scheduler: uses
- Mapped dispatch → Command handlers: dispatches to
- Composite dispatch → Command handlers: invokes
- Named events → Events: creates and fires
- Observable models → Events: fires commits
- REST parsing → JSON schemas: uses schema
- JSON data types → Date and time values: revives values
- JSON data types → Numeric and currency values: revives values
- Date and time values → Collections: uses comparator