0.0.50 • Published 2 months ago

@mewhhaha/little-router-plugin-data v0.0.50

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months ago

little-router-plugin-data

This is a plugin for little-router that allows you to specify what kind of JSON body should be passed with the request.

Example

import { data_ } from "@mewhhaha/little-router-plugin-data";
import { type } from "arktype";
import { Router } from "@mewhhaha/little-router";
import { json } from "@mewhhaha/typed-response";

const router = Router().post(
  "/a",
  [data_(type({ value: "'hello'" }))],
  ({ data }) => {
    return text(200, data.value);
  }
);
0.0.50

2 months ago

0.0.40

7 months ago

0.0.41

7 months ago

0.0.42

7 months ago

0.0.43

7 months ago

0.0.44

7 months ago

0.0.45

7 months ago

0.0.46

6 months ago

0.0.47

6 months ago

0.0.37

7 months ago

0.0.38

7 months ago

0.0.39

7 months ago

0.0.30

7 months ago

0.0.31

7 months ago

0.0.32

7 months ago

0.0.33

7 months ago

0.0.34

7 months ago

0.0.35

7 months ago

0.0.36

7 months ago

0.0.26

8 months ago

0.0.27

7 months ago

0.0.28

7 months ago

0.0.29

7 months ago

0.0.20

10 months ago

0.0.21

10 months ago

0.0.22

9 months ago

0.0.23

9 months ago

0.0.24

8 months ago

0.0.25

8 months ago

0.0.15

10 months ago

0.0.16

10 months ago

0.0.17

10 months ago

0.0.18

10 months ago

0.0.19

10 months ago

0.0.12

11 months ago

0.0.13

11 months ago

0.0.14

11 months ago

0.0.48

6 months ago

0.0.49

6 months ago

0.0.10

12 months ago

0.0.11

11 months ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.9

12 months ago

0.0.8

12 months ago

0.0.5

12 months ago

0.0.4

1 year ago

0.0.7

12 months ago

0.0.6

12 months ago

0.0.1

1 year ago