npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@thothom/core

v0.0.1

Published

ThothOM - The Ultimate OM For All Databases

Downloads

3

Readme

ThothOM

ThothOM is an Object Mapper, an ORM + ODM, based on TypeORM syntax and ESLint plugable approach. Our intention here is standardize the connection and implementation of every database with the best performance possible, and for this, we use an plugable approach, so more people can contribute and create their on integration. This package alone can't do anything besides typing, the plugins do all the "dirt work".

Currently it only works with TypeScript (and transpiled JavaScript), and we plan to keep this way.

Discord Community Docs

Why use ThothOM?

  • Easy to use and standardize. Regardless of the database, the implementation will be the same in all cases (except the most complex ones).
  • The plugable approach. With the community support, this OM can work with all the databases, be they NoSQL or SQL, as long as it has a plugin for it.
  • No globals! All that this package uses is encapsuled inside it's classes, so there is no need to worry about some config defined in a global scope compromising your code, but if you want, you can use setGlobalConnection() to allow globals.
  • Free and direct support. If you have any question, you can join our discord community, and we and the members of Techmmunity will help you!
  • Focused on microservices and serverless! We focus in keep it usable for serverless and microservices projects.

Install and Config

With Yarn:

yarn add @thothom/core reflect-metadata

With NPM:

npm i @thothom/core reflect-metadata

Configure tsconfig.json:

{
	"compilerOptions": {
		"experimentalDecorators": true,
		"emitDecoratorMetadata": true,
		"skipLibCheck": true
	}
}

Plugins List

All the ThothOM Plugins have the thothom tag, so you can easily found all the plugins at this link.

Plugins List

Usage

ThothOM only supports the Data Mapper pattern, so we can avoid mutability and bad code practices.

import { Column, Entity, PrimaryGeneratedColumn } from "@thothom/core";
// All plugins export a Connection class and a Repository type
import { Connection, Repository } from "example-thoth-plugin";

@Entity()
class FooEntity {
	@PrimaryColumn()
	public id: string;

	@Column()
	public foo: string;
}

type FooRepository = Repository<FooEntity>;

const bootstrap = async () => {
	const connection = new Connection({
		// Connection config here
		entities: [FooEntity],
	});

	await connection.load();
	await connection.connect();

	const fooRepository: FooRepository =
		connection.getRepository<FooEntity>(FooEntity);

	await fooRepository.save({
		bar: "foo",
	});

	await connection.close();
};

bootstrap();

Documentation

How to contribute?

All the details about contributing are in our website.

See here our to-dos.

Special Thanks

Contributors

This project exists thanks to all the people who contribute:

COMING SOON

Cool Kids

  • A very special thanks to the creators of TypeORM, without their code, this package would never exists.