0.1.1 • Published 7 years ago

@mainframe/utils-id v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

utils-id

Unique identifier utilities.

Installation

yarn add @mainframe/utils-id

Usage

import { uniqueID } from 'utils-id'

const id = uniqueID() // random string

Types

ID

Opaque type representing an unique ID as a string.

API

idType()

Simple identity function casting the provided value as ID to properly type-check.

Arguments

  1. value: any

Returns ID

uniqueID()

Returns ID

License

MIT