1.0.14 • Published 5 years ago

ts-guid v1.0.14

Weekly downloads
50
License
ISC
Repository
github
Last release
5 years ago

ts-guid

ts-guid provides functionality for simple Guids.

Index

Installation

This section shows how to install ts-guid.

npm

npm install --save ts-guid

yarn

yarn add ts-guid

Usage

This section shows how to use the features of ts-guid.

emptyGuid

This is an empty guid constant.

import { emptyGuid } from 'ts-guid';

const user: User = {
  id: emptyGuid
};

isGuid

Checks if a string is a guid.

import { isGuid } from 'ts-guid';

export function validateUser(user: User): boolean {
  return isGuid(user.id);
}

newGuid

Generates a new guid.

import { newGuid } from 'ts-guid';

const user: User = {
  id: newGuid()
};
1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago