Description
Presentation and transformation layer for data output in RESTful APIs.
Vicis alternatives and similar libraries
Based on the "API" category.
Alternatively, view Vicis alternatives based on common mentions on social networks and blogs.
-
React Query
DISCONTINUED. π€ Powerful asynchronous state management, server-state utilities and data fetching for TS/JS, React, Solid, Svelte and Vue. [Moved to: https://github.com/TanStack/query] -
urql
The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow. -
Optic
OpenAPI linting, diffing and testing. Optic helps prevent breaking changes, publish accurate documentation and improve the design of your APIs. -
SapphireDb
SapphireDb Server, a self-hosted, easy to use realtime database for Asp.Net Core and EF Core -
Hatchify
JavaScript, open source, CRUD app scaffolding that turns schemas into an app quickly, while allowing customization later. -
prim-rpc
Easy-to-understand, type-safe, transport-agnostic RPC/IPC for JavaScript, supporting callbacks, batching, file handling, custom serialization, and more. -
Bearer API Client for JavaScript
DISCONTINUED. Bearer provides all of the tools to build, run and manage API integrations.
SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Vicis or a related project?
README
[Vicis](.github/assets/banner.webp?raw=true "Vicis")
Β« Vicis Β»
Presentation and transformation layer for data output in RESTful APIs.
β’β’ Vicis Documentation β’β’ JavaScript Repository β’β’ Deno Repository β’β’
This is Node.js analogue to these libraries: π Fractal for PHP, π Roar for Ruby, π’ Marshmallow for Python.
π¬ Tl;dr
Code:
import { Vicis } from "vicis";
const configuration = {
cast: { _id: Vicis.INTEGER, registered: Vicis.FLAG },
defaults: { confirmed: false },
exclude: [/(?:password)/gi, /^(?:_)(?:_)?/],
omit: ["createdAt", "updatedAt", "deletedAt"],
rename: { _id: "id", email: "login" },
replace: { url: null }
};
const model = {
_id: "54759309034942804",
email: "[email protected]",
userPassword: "36e80092ff7f1ed72903cda9409b9d2c",
registered: "1",
url: "example.com",
createdAt: "2020-01-01 01:23:45",
__v: 1
};
const serializer = new Vicis(configuration);
serializer.data(model);
console.log(serializer.getData());
Output:
{
"confirmed": false,
"id": 54759309034942804,
"login": "[email protected]",
"registered": true,
"url": null
}
πΊοΈ My other projects
<!-- Badges -->