Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

alexcupertme/mapia

Open more actions menu

Repository files navigation

Mapia

Logo

License TypeScript Test & Coverage codecov

Mapia is a fast, type-safe object mapper for TypeScript that keeps mappings explicit without imposing runtime dependencies. The mapper infers every field from the source and destination shapes, so you are protected from typos and silent runtime failures.

Note

December 2025 update: Mapia is now faster up to 2000x than Class Transformer and AutoMapper-TS

January 2026 update: Major object mapping update!

See more updates!

Quick start

pnpm add mapia
import { compileMapper, rename, transform, ignore } from 'mapia';

const userMapper = compileMapper<UserResponse, UserEntity>({
  id: transform((value) => Number(value)),
  name: rename('fullName'),
  updatedAt: ignore(),
});

const user = userMapper.mapOne(apiResponse);

Documentation

The full documentation is now can be found here:

https://alexcupertme.github.io/mapia/

Benchmark

benchmark

You can run the benchmark yourself with:

pnpm run:bench

Contributing

Contributions are welcome! See docs/contributing.md for how to get involved.

License

Mapia is released under the MIT License.

Releases

Packages

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.