0.2.25 • Published 2 years ago
@assetval/name v0.2.25
Name
This is the Veritas Name Schema workspace.
Installation
yarn add @assetval/nameUsage
As a Class (Front End)
import { Name } from '@assetval/name';
const name = new Name({
first: 'John',
last: 'Doe',
middle: 'A',
preferred: 'Johnny'
});As Schema (Back End)
import { NameSchema, Name } from '@assetval/name';
import { model } from 'mongoose';
export const NameModel = model<Name>('names', NameSchema);As Validation (Back End)
import { nameSchemaValidation } from '@assetval/name';
import { z } from 'zod';
import { MagikRoutes } from '../middleware/RouterManager.js';
const ProfileRoute = MagikRoutes.getRouter('/profile');
ProfileRoute.post('/updateName', {
auth: 'ensureAuthenticated',
validationSchema: z.object({
body: nameSchemaValidation
}),
route: async (req, res): Promise<void> => {
// Do something
}
});License
MIT
Authors
Contributing
Download the Schema repository and make sure you have the following installed:
- asdf
- NodeJS (ASDF)
- Yarn (Corepack / Node / ASDF)
- moonrepo
- git-chglog (ASDF)
Then run the following commands:
yarn install0.2.25
2 years ago
0.2.24
2 years ago
0.2.23
2 years ago
0.2.22
2 years ago
0.2.21
2 years ago
0.2.20
2 years ago
0.2.19
2 years ago
0.2.18
2 years ago
0.2.17
2 years ago
0.2.16
2 years ago
0.2.15
2 years ago
0.2.14
2 years ago
0.2.13
2 years ago
0.2.11
2 years ago
0.2.9
2 years ago
0.2.4
2 years ago
0.2.3
2 years ago
0.0.5
2 years ago
0.0.4
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago