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

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago