Skip to content

Releases: monokkai/mockmate

Mockmate v1.0.3: Beautiful Data Visualization

23 Jan 19:55
88629d1

Choose a tag to compare

🎨 What's New

✨ Beautiful Console Output

MockMate now supports multiple view modes for your mock data:

table - Elegant ASCII tables with colors and proper formatting
json - Syntax-highlighted JSON output
raw (default) - Returns plain data array
🚀 Enhanced API

New view option in MockmateOptions for controlling output format
Smart table rendering with automatic column width calculation
Color-coded values (numbers, strings, booleans)
Compact mode for large dataste

Display as Beautiful Table

import { mockmate } from "mockmate";

// Get users as a beautiful table
await mockmate({
  category: "users",
  quantity: 5,
  view: "table", // 👈 New view option! or `json ` or `raw`
  pick: ["id", "name", "email", "website"]
});

Output:

┌────┬──────────────────────┬─────────────────────────────┬─────────────────────┐
│ id │ name                 │ email                       │ website             │
├────┼──────────────────────┼─────────────────────────────┼─────────────────────┤
│ 1  │ Leanne Graham        │ Sincere@april.biz          │ hildegard.org       │
│ 2  │ Ervin Howell         │ Shanna@melissa.tv          │ anastasia.net       │
│ 3  │ Clementine Bauch     │ Nathan@yesenia.net         │ ramiro.info         │
└────┴──────────────────────┴─────────────────────────────┴─────────────────────┘

📊 3 rows | 4 columns

Mockmate v1.0.1

10 Jan 21:41
587d088

Choose a tag to compare

🚀 What's New

🔌 Multi-Source Support

MockMate now supports multiple public APIs for test data generation:

JSONPlaceholder (default) - Classic REST API with users, posts, comments, todos
FakeStoreAPI - E-commerce data with products, carts, and users

Use FakeStoreAPI or JSONPlaceholder(by default)

const products = await mockmate({
  source: "fakestoreapi", // source: "jsonplaceholder"
  category: "products",  // FakeStoreAPI categories: "products", "carts"
  quantity: 3,
});

Mockmate v1.0.0

07 Jan 22:21

Choose a tag to compare

🚀 Mockmate v1.0.0 — First Stable Release

🎉 Mockmate officially reaches v1.0.0!
This release marks the first stable, production-ready version of the library.

Mockmate is a lightweight, type-safe mock data generator for JavaScript & TypeScript — built for developers who need fast, flexible fake data without heavy dependencies.


✨ What’s New in v1.0.0

🧩 Schema-based Generator (NEW)

Generate fully custom mock data using a schema of functions:

import { generate } from "@mockmate/mockmate";

const users = await generate({
  quantity: 3,
  schema: {
    id: () => crypto.randomUUID(),
    username: () => `user_${Math.random().toString(36).slice(2)}`,
    age: () => Math.floor(Math.random() * 50) + 18,
  },
});

MockMate v0.0.9

06 Jan 18:21

Choose a tag to compare

✨ Mockmate v0.0.9

Mockmate is a lightweight TypeScript-first library for generating mock data with a simple, flexible API.

This initial public release provides a stable core for generating mock entities from predefined categories (e.g. users), with support for:

Features

  • 📦 TypeScript-first API with full type safety
  • 🔁 Generate multiple mock entities with a single call
  • 🎯 Field selection (pick) for lean mock objects
  • 🧩 Data extension via custom generators
  • 🌐 Axios-based data fetching
  • ⚠️ Proper error handling with custom errors
  • 📤 ESM-ready package with modern exports

Example

import { mockmate } from '@mockmate/mockmate'

const users = await mockmate({
  category: 'users',
  quantity: 2,
  pick: ['id', 'name', 'email'],
  extend: {
    isActive: () => true
  }
})

console.log(users)

Installation

npm install @mockmate/mockmate
# or
yarn add @mockmate/mockmate
# or
pnpm add @mockmate/mockmate