{"repo":"mswjs/data","free":true,"listed":false,"github":"https://github.com/mswjs/data","clone":"git clone https://github.com/mswjs/data.git","description":"Data querying library for testing JavaScript applications.","language":"TypeScript","stars":1036,"topics":["mocking","orm","data-modeling","api","fixtures","testing","testing-tool"],"license":"MIT","category":"databases-storage","readme_excerpt":"[standard-schema]: https://standardschema.dev/ @msw/data Data querying library for testing JavaScript applications. Motivation This library exists to help developers model and query data when testing and developing their applications. It acts as a convenient way of creating schema-based fixtures and querying them with a familiar ORM-inspired syntax. It can be used standalone or in conjuncture with Mock Service Worker for seamless mocking experience both on the network and the data layers. Features - Relies on [Standard Schema][standard-schema] instead of inventing a proprietary modeling syntax you have to learn. You can use any Standard Schema-compliant object modeling library to describe your data, like Zod, ArkType, Valibot, yup, and many others. - Full runtime and type-safety. - Provides a powerful querying syntax (inspired by Prisma); - Supports relations for database-like behaviors (inspired by Drizzle); - Supports extensions (including custom extensions) for things like cross-tab collection synchronization or record persistence. --- Getting started Install Create collection You start by defining a data collection . Above, I'm using Zod to describe the schema for my users collection. You can use whichever [Standard Schema][standard-schema] compliant library of your choice instead. Seed collection Next, let's put some values into our collection. Those values are called records and you can create individual records via the .create() method or create a bunch of them with .c","default_branch":null,"files":null,"tree":[],"storefront":"/r/mswjs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mswjs/data/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}