4.1.1 • Published 3 years ago
@used-hood/collection v4.1.1
Collection
Collection on effector.
npm install @used-hood/collection
import { v4 as createUUIDv4 } from 'uuid'
import { Collection } from '@used-hood/collection'
const USER_COLLECTION_NAME = 'User'
type UserCollectionData = {
login: string
password: {
hash: string
salt: string
}
}
type UserCollectionName = typeof USER_COLLECTION_NAME
export const Users = Collection.of<UserCollectionData, UserCollectionName>({
name: 'User',
generateId: createUUIDv4
})