# steipete/aspects

**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/steipete-aspects).**

8,436 stars · 1,268 forks · Objective-C · mit · archived

## Links

- GitHub: https://github.com/steipete/Aspects
- Homepage: https://twitter.com/steipete
- awesome-repositories: https://awesome-repositories.com/repository/steipete-aspects.md

## Topics

`aspects` `hooks` `objective-c` `objectivec` `swift`

## Description

Aspects is an aspect-oriented programming library and method hooking framework designed for intercepting and modifying JavaScript function behavior without altering the original source code. It serves as a runtime logic injector that allows for the addition and removal of executable code wrappers from active functions.

The library enables the injection of custom logic before or after methods to change application behavior at runtime. It further provides the ability to intercept method calls to capture or override return values before they reach the caller.

The framework manages these interceptions through a dynamic proxy wrapper and uses token-based tracking to deregister specific logic layers and restore original method behavior.

## Tags

### Software Engineering & Architecture

- [Aspect-Oriented Programming Frameworks](https://awesome-repositories.com/f/software-engineering-architecture/aspect-oriented-programming-frameworks.md) — Provides a framework for implementing cross-cutting concerns by injecting custom logic into functions.
- [Method Hooking Frameworks](https://awesome-repositories.com/f/software-engineering-architecture/method-hooking-frameworks.md) — Provides a framework for intercepting and modifying JavaScript function behavior using runtime hooks.
- [Behavioral Logic Injection](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/object-oriented-foundations/game-logic-models/game-logic-controllers/behavioral-logic-injection.md) — Runs additional code before or after a method to change behavior without editing the original source. ([source](https://twitter.com/steipete/status/1025024813889478656))
- [Dynamic Function Interception](https://awesome-repositories.com/f/software-engineering-architecture/dynamic-function-interception.md) — Captures function calls to execute additional code or modify return values before they reach the original caller.
- [Higher-Order Function Wrapping](https://awesome-repositories.com/f/software-engineering-architecture/higher-order-function-wrapping.md) — Wraps original functions in a proxy layer to execute custom logic before and after the core method runs.
- [Runtime Logic Injection](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/dependency-injection/ui-component-injection/logic-component-injection/runtime-logic-injection.md) — Injects custom executable code into existing method paths during application execution to extend functionality.
- [Method Interception Proxies](https://awesome-repositories.com/f/software-engineering-architecture/method-interception-proxies.md) — Adds or changes behavior in existing functions at runtime without altering the original source code.
- [Method Logic Injection](https://awesome-repositories.com/f/software-engineering-architecture/method-logic-injection.md) — Runs additional code before or after a method to change behavior without editing the original source. ([source](https://twitter.com/steipete/status/1139491030586265600))

### Operating Systems & Systems Programming

- [Runtime Logic Modification](https://awesome-repositories.com/f/operating-systems-systems-programming/runtime-logic-modification.md) — Changes how a software system operates by wrapping existing methods with new logic via dynamic hooks.

### Programming Languages & Runtimes

- [Runtime Logic Injectors](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-logic-injectors.md) — Implements a system for adding and removing executable code wrappers from active functions using token-based tracking.
- [Method Return Values](https://awesome-repositories.com/f/programming-languages-runtimes/block-value-returns/method-return-values.md) — Intercepts function calls to modify or replace the returned values before they reach the caller.
- [Return Value Interceptors](https://awesome-repositories.com/f/programming-languages-runtimes/block-value-returns/method-return-values/return-value-interceptors.md) — Intercepts method calls to capture or override the value sent back to the caller. ([source](https://cdn.jsdelivr.net/gh/steipete/aspects@master/README.md))
- [Return Value Transformers](https://awesome-repositories.com/f/programming-languages-runtimes/block-value-returns/method-return-values/return-value-transformers.md) — Captures the output of wrapped functions and applies transformations before passing the result back to the caller.

### Testing & Quality Assurance

- [Runtime Method Patching](https://awesome-repositories.com/f/testing-quality-assurance/function-call-tracking/function-behavior-replacement/runtime-method-patching.md) — Swaps original function references with decorated versions at runtime to modify behavior without altering source code.

### Data & Databases

- [Hook Lifecycle Tracking](https://awesome-repositories.com/f/data-databases/token-extensions/token-hooks/hook-lifecycle-tracking.md) — Stores unique identifiers for each injected wrapper to allow precise removal of specific logic layers from the call stack.

### User Interface & Experience

- [Method Hooking](https://awesome-repositories.com/f/user-interface-experience/font-rasterizers/api-interception-hooks/method-hooking.md) — Deregisters logic wrappers using unique tokens to restore the original behavior of a method. ([source](https://cdn.jsdelivr.net/gh/steipete/aspects@master/README.md))
