Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.
/ detajs-sm Public archive

A small Deta Base wrapper with Typescript support.

License

Notifications You must be signed in to change notification settings

tbdsux/detajs-sm

Repository files navigation

detajs-sm

Small Deta Base wrapper with Typescript support.

What's different?

This library / package aims to focus more on json object types, so most functions will implement the type defined when initiating a base.

Install

# npm
npm install detajs-sm

# yarn
yarn add detajs-sm

# pnpm
pnpm add detajs-sm

Usage

Usage is similar with the official Javascript SDK

import { Deta } from "detajs-sm";

export interface User {
  name: string;
  key: string; // needs to be set
}

const deta = Deta();
const usersBase = deta.Base<User>("allUsers");

const userKey = await users.put({
  name: "user",
});
console.log(userKey);

© 2023 | tbdsux

About

A small Deta Base wrapper with Typescript support.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published