Socket
Book a DemoInstallSign in
Socket

@assetval/counter

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@assetval/counter

AssetVal's counter workspace

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
0
Created
Source

Counter

This is the Veritas Counter Schema workspace.

Installation

yarn add @assetval/counter

Usage

As a Class (Front End)

import { Counter } from '@assetval/counter';

const counter = new Counter();

As Schema (Back End)

import { {Counter}Schema, Counter } from '@assetval/counter';
import { Model } from 'mongoose';

export const {Counter}Model = model<Counter>('{counter}es', {Counter}Schema);

As Validation (Back End)

import { {Counter}ValidationSchema } from '@assetval/counter';
import { z } from 'zod';
import { MagikRoutes } from '../middleware/RouterManager.js';

const ProfileRoute = MagikRoutes.getRouter('/profile');

ProfileRoute.post('/updateCounter', {
  auth: 'ensureAuthenticated',
  validationSchema: z.object({
    body: {Counter}ValidationSchema
  }),
  route: async (req, res): Promise<void> => {
    // Do something
  }
});

License

MIT

Authors

  • Abourass

Contributing

Download the Schema repository and make sure you have the following installed:

  • asdf
  • NodeJS (ASDF)
  • PNPM (Corepack / Node / ASDF)
  • NX

Then run the following commands:

pnpm install

FAQs

Package last updated on 30 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts