# jayphelps/core-decorators

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/jayphelps-core-decorators).**

4,495 stars · 255 forks · JavaScript · MIT · archived

## Links

- GitHub: https://github.com/jayphelps/core-decorators
- awesome-repositories: https://awesome-repositories.com/repository/jayphelps-core-decorators.md

## Description

core-decorators is a JavaScript class decorator library and framework utility for extending class functionality. It provides a collection of tools for implementing class behavior mixins, automating method binding to avoid manual constructor configuration, and verifying that subclass methods correctly override parent methods.

The library includes a code deprecation toolkit for flagging obsolete methods with console warnings and a function execution profiler for measuring performance and duration. It further enables the modification of class and method behavior through a system of custom decorators and shared logic injection.

Additional capabilities cover object property control, including the enforcement of read-only properties and the restriction of property visibility. The toolkit also provides performance primitives such as result caching and deferred property initialization to delay execution until first access.

## Tags

### User Interface & Experience

- [Behavioral Injection](https://awesome-repositories.com/f/user-interface-experience/component-utilities/ui-frameworks/rendering-models/composition-rendering-patterns/component-patterns/class-components/class-decorators/behavioral-injection.md) — Provides a comprehensive system of decorators for injecting shared behaviors and custom logic into JavaScript classes.
- [Class Decorators](https://awesome-repositories.com/f/user-interface-experience/component-utilities/ui-frameworks/rendering-models/composition-rendering-patterns/component-patterns/class-components/class-decorators.md) — Provides a collection of class decorators to modify and extend the behavior of JavaScript classes and methods.
- [Automatic Method Binding](https://awesome-repositories.com/f/user-interface-experience/method-callback-binding/automatic-method-binding.md) — Ensures class methods maintain a permanent reference to the class instance without requiring manual constructor binding. ([source](https://github.com/jayphelps/core-decorators/blob/master/bower.json))

### Programming Languages & Runtimes

- [Class Mixins](https://awesome-repositories.com/f/programming-languages-runtimes/class-creation-customization/inheritance-and-mixin-classes/class-mixins.md) — Implements class behavior mixins to inject shared functionality from multiple sources into a single target class.
- [Override Validations](https://awesome-repositories.com/f/programming-languages-runtimes/class-inheritance/override-validations.md) — Ensuring that subclass methods correctly override parent methods to prevent accidental naming collisions or signature mismatches.
- [Automatic Context Binding](https://awesome-repositories.com/f/programming-languages-runtimes/class-method-definitions/instance-methods/automatic-context-binding.md) — Automatically binds class methods to their instances to ensure the correct context is maintained during callbacks.
- [Function Context Binding](https://awesome-repositories.com/f/programming-languages-runtimes/function-context-binding.md) — Provides utilities to permanently bind the this context to class instances for consistent function execution.
- [Function Decorators](https://awesome-repositories.com/f/programming-languages-runtimes/functional-programming-logic/function-decorators.md) — Allows wrapping methods with custom helper functions or third-party utilities to augment their behavior. ([source](https://github.com/jayphelps/core-decorators/blob/master/README.md))
- [Object Method Binding](https://awesome-repositories.com/f/programming-languages-runtimes/object-method-binding.md) — Automatically associates class methods with their respective instances to avoid manual constructor binding.
- [Override Enforcement](https://awesome-repositories.com/f/programming-languages-runtimes/class-method-overrides/override-enforcement.md) — Verifies that subclass methods correctly override parent class methods to ensure architectural integrity. ([source](https://github.com/jayphelps/core-decorators/blob/master/bower.json))
- [Override Validation](https://awesome-repositories.com/f/programming-languages-runtimes/class-method-overrides/override-validation.md) — Verifies that subclass methods correctly override parent class methods to prevent naming collisions and signature mismatches.
- [Override Verification](https://awesome-repositories.com/f/programming-languages-runtimes/class-method-overrides/override-verification.md) — Verifies that subclass methods correctly override parent methods to prevent naming collisions and signature mismatches.
- [Deprecated Feature Markings](https://awesome-repositories.com/f/programming-languages-runtimes/deprecated-feature-markings.md) — Provides a mechanism to flag methods as obsolete to warn developers through console warnings. ([source](https://github.com/jayphelps/core-decorators/blob/master/package.json))
- [Lazy Property Initialization](https://awesome-repositories.com/f/programming-languages-runtimes/dynamic-class-creation/class-loading-mechanisms/lazy-loading/lazy-property-initializers/lazy-property-initialization.md) — Implements deferred property initialization to delay execution and reduce memory allocations until first access.
- [Method Wrapping](https://awesome-repositories.com/f/programming-languages-runtimes/java-method-invocations/method-wrapping.md) — Applies external functions and arguments to a method to wrap it with custom logic. ([source](https://github.com/jayphelps/core-decorators#readme))
- [Property Descriptors](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/javascript-language-features/property-descriptors.md) — Manipulates property descriptors to control the enumerability, writability, and configurability of class members.
- [Object Property Descriptor Controls](https://awesome-repositories.com/f/programming-languages-runtimes/object-property-descriptor-controls.md) — Enforces stricter data integrity by restricting property visibility and marking class members as read-only.

### Software Engineering & Architecture

- [General Purpose Mixins](https://awesome-repositories.com/f/software-engineering-architecture/behavioral-mixins/general-purpose-mixins.md) — Implements reusable class fragments to inject shared behavior across diverse class hierarchies.
- [Higher-Order Function Wrapping](https://awesome-repositories.com/f/software-engineering-architecture/higher-order-function-wrapping.md) — Augments method behavior by wrapping original functions with helper logic for profiling, caching, or warning suppression.
- [API Deprecation Notifications](https://awesome-repositories.com/f/software-engineering-architecture/deprecation-management/deprecation-warning-loggers/api-deprecation-notifications.md) — Emits custom console warnings and URLs when deprecated methods are invoked to notify developers. ([source](https://github.com/jayphelps/core-decorators#readme))
- [Developer Deprecation Warnings](https://awesome-repositories.com/f/software-engineering-architecture/deprecation-management/developer-deprecation-warnings.md) — Provides a toolkit for flagging obsolete methods with console warnings to guide developers during codebase migration.
- [Function Execution Timing](https://awesome-repositories.com/f/software-engineering-architecture/function-execution-timing.md) — Tracks the elapsed time of function execution using console timing labels to identify bottlenecks. ([source](https://github.com/jayphelps/core-decorators#readme))

### Part of an Awesome List

- [API Deprecation Tooling](https://awesome-repositories.com/f/awesome-lists/data/data-integration-and-import/version-to-version-migrations/api-method-migrations/api-deprecation-tooling.md) — Marks outdated methods as deprecated to warn developers and guide them toward newer API alternatives.

### System Administration & Monitoring

- [Function Execution Timers](https://awesome-repositories.com/f/system-administration-monitoring/decorator-based-instrumentation/function-execution-timers.md) — Measures the execution time of functions using browser console timers via decorators.

### Testing & Quality Assurance

- [Performance Profilers](https://awesome-repositories.com/f/testing-quality-assurance/performance-profilers.md) — Triggers browser profiling using console timers for single runs or specific time intervals. ([source](https://github.com/jayphelps/core-decorators#readme))
- [Performance Profiling](https://awesome-repositories.com/f/testing-quality-assurance/performance-testing-analysis/performance-profiling.md) — Includes tools to monitor execution time and resource usage to identify performance bottlenecks.
