1.0.14 • Published 6 years ago

ts-guid v1.0.14

Weekly downloads
50
License
ISC
Repository
github
Last release
6 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

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

8 years ago

1.0.10

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago