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
pnpm add mapiaimport { 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);The full documentation is now can be found here:
https://alexcupertme.github.io/mapia/
You can run the benchmark yourself with:
pnpm run:benchContributions are welcome! See docs/contributing.md for how to get involved.
Mapia is released under the MIT License.