Skip to main content
Home

latest
Works with
It is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
It is unknown whether this package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score82%
Published7 months ago (0.1.0)

@dao/codex-mock2

JSR JSR Score

codex/mock2 atomic package for the Daobox Codex ecosystem.

Features

  • 🚀 TypeScript First: Written in TypeScript with full type safety
  • 📦 Zero Dependencies: Lightweight and self-contained
  • 🌐 Cross-Runtime: Works in Deno, Node.js, Bun, and browsers
  • 📖 Well Documented: Complete JSDoc documentation

Installation

JSR (Recommended)

# Deno
deno add @dao/codex-mock2

# Bun
bun add @dao/codex-mock2@jsr

# Node.js (with JSR CLI)
npx jsr add @dao/codex-mock2

# Node.js (manual)
npm install @jsr/dao__codex-mock2

Import

// JSR
import { codex/mock2 } from "@dao/codex-mock2";

// npm (Node.js)
import { codex/mock2 } from "@jsr/dao__codex-mock2";

Usage

Basic Example

import { codex/mock2 } from "@dao/codex-mock2";

const result = codex/mock2();
console.log(result); // "Hello from codex/mock2!"

Advanced Usage

// Add your advanced usage examples here
import { codex/mock2 } from "@dao/codex-mock2";

// Example with custom parameters
const customResult = codex/mock2();
console.log(customResult);

API Reference

codex/mock2()

Main exported function for codex/mock2.

Returns: string - A greeting message

Example:

const result = codex/mock2();
console.log(result); // "Hello from codex/mock2!"

Development

Prerequisites

Scripts

# Install dependencies
bun install

# Run tests
bun test

# Type check
bun run typecheck

# Publish to JSR
bun run publish:jsr

Project Structure

.
├── src/
│   └── index.ts          # Main module
├── tests/
│   └── index.test.ts     # Test suite
├── jsr.json             # JSR configuration
├── package.json         # Package configuration  
├── tsconfig.json        # TypeScript configuration
├── README.md           # This file
└── LICENSE             # MIT License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with ❤️ by the DAO team

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@dao/codex-mock2

Import symbol

import * as codex_mock_ from "@dao/codex-mock2";
or

Import directly with a jsr specifier

import * as codex_mock_ from "jsr:@dao/codex-mock2";

Add Package

pnpm i jsr:@dao/codex-mock2
or (using pnpm 10.8 or older)
pnpm dlx jsr add @dao/codex-mock2

Import symbol

import * as codex_mock_ from "@dao/codex-mock2";

Add Package

yarn add jsr:@dao/codex-mock2
or (using Yarn 4.8 or older)
yarn dlx jsr add @dao/codex-mock2

Import symbol

import * as codex_mock_ from "@dao/codex-mock2";

Add Package

vlt install jsr:@dao/codex-mock2

Import symbol

import * as codex_mock_ from "@dao/codex-mock2";

Add Package

npx jsr add @dao/codex-mock2

Import symbol

import * as codex_mock_ from "@dao/codex-mock2";

Add Package

bunx jsr add @dao/codex-mock2

Import symbol

import * as codex_mock_ from "@dao/codex-mock2";