Skip to content

Commit 13e5ec0

Browse files
authored
Fix wording and rewrite few sentences to improve readability
1 parent 290d510 commit 13e5ec0

File tree

5 files changed

+10
-14
lines changed

5 files changed

+10
-14
lines changed

docs/concept/derive.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ head:
1515
---
1616

1717
# Derive
18-
Just like state and decorate, derive allows you to customize `Context` based on existing `Context` as `Context.store`.
18+
Just like _state_ and _decorate_, derive allows you to customize `Context` based on existing `Context` as `Context.store`.
1919

2020
This is useful when you to need to create a value based on an existing value reactively.
2121

docs/concept/guard.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ head:
1818
# Guard
1919
Suppose you have many shared local hooks.
2020

21-
Instead of writing duplicated hook, you can define a shared hook scope using `guard`.
21+
Instead of duplicating an existing hook, you can define a shared hook scope using `guard`.
2222

2323
---
24-
**Guard** let you to inject multiple life-cycle event into multiple routes at once. Guard is useful when you have duplicated life-cycle in the multiple route, for example. logging, schema validation, or error handling.
24+
**Guard** lets you inject multiple life-cycle events into multiple routes at once. Guard is useful when you have listen to same life-cycle events in the multiple routes, for example: logging, schema validation, or error handling.
2525

2626
To encapsulate all hooks into the scope, instead of writing:
2727
```typescript

docs/concept/handler.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ head:
1515
---
1616

1717
# Handler
18-
For routing is to tell which function to return a response to.
18+
To route is to tell which function should return a response.
1919

2020
The function for returning a Response is `Handler`.
2121

@@ -80,7 +80,7 @@ new Response(JSON.stringify({
8080
})
8181
```
8282
83-
But Elysia handle that for you.
83+
But Elysia handles that for you.
8484
8585
You simply return an object, and Elysia will map your value to a correct response for you.
8686
```typescript

docs/concept/middleware.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,14 @@ head:
1515
---
1616

1717
# Middleware
18-
Elysia has Life Cycle event support which you get called on a specific event.
18+
Elysia supports Life Cycle events, which trigger at specific moments.
1919

20-
Middleware or Hook is an event listener to "hook", and listen to those events cycling around.
20+
A _Middleware_ or _Hook_ acts as an event listener, allowing you to "hook" into these events. This Hook capability enables you to modify data as it moves through the data pipeline.
2121

22-
Hook allows you to transform data running through the data pipeline.
23-
24-
Whether you want to create a custom body parser, return a custom response based on your handler, or define a custom function for guarding authentication.
25-
26-
With the hook, you can customize Elysia to its fullest potential.
22+
Whether you aim to implement a custom body parser, generate a tailored response based on your handler, or set up an authentication guard, the Hook empowers you to harness the full potential of Elysia.
2723

2824
## Life Cycle
29-
The life cycle in Elysia consists of:
25+
The life cycle events in Elysia consists of:
3026
- Start: setup some requirement before the server start serving
3127
(Start Loop)
3228
- Request: get notified of every new request

docs/concept/numeric.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ head:
1717

1818
# Numeric
1919

20-
Sometime you might found yourself in need of numeric string like extracting path parameter, but it's typed as string and need to be convert to number.
20+
Sometime you might find yourself in need of numeric string like extracting path parameter, but it's typed as string and need to be convert to number.
2121

2222
Using Elysia's `transform` life-cycle, you can manually parse number to string and reuse the transform function in other handler as well.
2323

0 commit comments

Comments
 (0)