|
1 | | -<!DOCTYPE html> |
| 1 | +<!doctype html> |
2 | 2 | <html lang="en"> |
3 | 3 | <head> |
4 | 4 | <meta charset="utf-8" /> |
@@ -141,6 +141,110 @@ <h2>The Ecosystem</h2> |
141 | 141 | </div> |
142 | 142 |
|
143 | 143 | <div class="projects-grid"> |
| 144 | + <!-- fast-injection --> |
| 145 | + <article class="project-card"> |
| 146 | + <div class="card-header"> |
| 147 | + <div class="project-meta"> |
| 148 | + <h3>fast-injection</h3> |
| 149 | + <div class="tags"> |
| 150 | + <span class="tag">Dependency Injection</span> |
| 151 | + <span class="tag">TypeScript</span> |
| 152 | + <span class="tag">Bun</span> |
| 153 | + </div> |
| 154 | + </div> |
| 155 | + </div> |
| 156 | + <p class="project-desc"> |
| 157 | + Modern TypeScript dependency injection container optimized for Bun runtime. Blazing fast with |
| 158 | + sub-microsecond resolution (~26M ops/sec for cached singletons), lightweight (<5KB), and fully |
| 159 | + type-safe. Supports singleton, transient, and scoped lifetimes with flexible API options: decorators, |
| 160 | + functional, or imperative. Built-in security against prototype pollution, memory leaks, and DoS attacks. |
| 161 | + Includes testing utilities for easy mocking and test isolation. |
| 162 | + </p> |
| 163 | + <div class="project-links"> |
| 164 | + <a href="https://github.com/BackendStack21/fast-injection" class="link-item" |
| 165 | + ><svg |
| 166 | + xmlns="http://www.w3.org/2000/svg" |
| 167 | + width="16" |
| 168 | + height="16" |
| 169 | + viewBox="0 0 24 24" |
| 170 | + fill="none" |
| 171 | + stroke="currentColor" |
| 172 | + stroke-width="2" |
| 173 | + stroke-linecap="round" |
| 174 | + stroke-linejoin="round" |
| 175 | + > |
| 176 | + <path |
| 177 | + d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22" |
| 178 | + ></path></svg |
| 179 | + >GitHub</a |
| 180 | + > |
| 181 | + <a href="https://www.npmjs.com/package/fast-injection" target="_blank" class="link-item" |
| 182 | + ><svg |
| 183 | + xmlns="http://www.w3.org/2000/svg" |
| 184 | + width="16" |
| 185 | + height="16" |
| 186 | + viewBox="0 0 24 24" |
| 187 | + fill="none" |
| 188 | + stroke="currentColor" |
| 189 | + stroke-width="2" |
| 190 | + stroke-linecap="round" |
| 191 | + stroke-linejoin="round" |
| 192 | + > |
| 193 | + <path |
| 194 | + d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z" |
| 195 | + ></path> |
| 196 | + <polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline> |
| 197 | + <line x1="12" y1="22.08" x2="12" y2="12"></line></svg |
| 198 | + >npm</a |
| 199 | + > |
| 200 | + <a href="https://fast-injection.21no.de" target="_blank" class="link-item" |
| 201 | + ><svg |
| 202 | + xmlns="http://www.w3.org/2000/svg" |
| 203 | + width="16" |
| 204 | + height="16" |
| 205 | + viewBox="0 0 24 24" |
| 206 | + fill="none" |
| 207 | + stroke="currentColor" |
| 208 | + stroke-width="2" |
| 209 | + stroke-linecap="round" |
| 210 | + stroke-linejoin="round" |
| 211 | + > |
| 212 | + <circle cx="12" cy="12" r="10"></circle> |
| 213 | + <line x1="2" y1="12" x2="22" y2="12"></line> |
| 214 | + <path |
| 215 | + d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" |
| 216 | + ></path></svg |
| 217 | + >Website</a |
| 218 | + > |
| 219 | + </div> |
| 220 | + <div class="badges"> |
| 221 | + <img |
| 222 | + src="https://img.shields.io/github/stars/BackendStack21/fast-injection?style=flat-square&labelColor=1e293b&color=38bdf8" |
| 223 | + alt="GitHub Stars" |
| 224 | + /> |
| 225 | + <img |
| 226 | + src="https://img.shields.io/npm/v/fast-injection?style=flat-square&labelColor=1e293b&color=38bdf8" |
| 227 | + alt="npm version" |
| 228 | + /> |
| 229 | + </div> |
| 230 | + <div class="code-preview"> |
| 231 | + <div class="code-header"> |
| 232 | + <span>Quick Start</span> |
| 233 | + <button class="copy-btn" onclick="copyCode(this)">Copy</button> |
| 234 | + </div> |
| 235 | + <pre><code><span class="k">import</span> { Container } <span class="k">from</span> <span class="s">'fast-injection'</span>; |
| 236 | +<span class="k">import</span> { singleton, inject } <span class="k">from</span> <span class="s">'fast-injection/decorators'</span>; |
| 237 | + |
| 238 | +<span class="k">@singleton</span>() |
| 239 | +<span class="k">class</span> <span class="f">UserService</span> { |
| 240 | + <span class="f">getUser</span>(id) { <span class="k">return</span> { id, name: <span class="s">'John'</span> }; } |
| 241 | +} |
| 242 | + |
| 243 | +<span class="k">const</span> container = <span class="k">new</span> <span class="f">Container</span>(); |
| 244 | +container.<span class="f">register</span>(UserService);</code></pre> |
| 245 | + </div> |
| 246 | + </article> |
| 247 | + |
144 | 248 | <!-- kMOSAIC --> |
145 | 249 | <article class="project-card"> |
146 | 250 | <div class="card-header"> |
|
0 commit comments