New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

typescript-guid

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typescript-guid

Guid generator to typescript, based on https://github.com/NicolasDeveloper/guid-typescript

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

Guid Typescript

Guid Typescript is a library that lets you generate guid code

Based on https://github.com/NicolasDeveloper/guid-typescript

original author https://github.com/NicolasDeveloper

Installation and usage

Installation

npm i typescript-guid --save

Basic usage

import { Guid } from "typescript-guid";

export class Example {
    public id: Guid;
    constructor() {
        this.id = Guid.create(); // ==> b77d409a-10cd-4a47-8e94-b0cd0ab50aa1
    }
}

Props and Methods

Method/PropDescriptionTestStatus
static isGuid (guid: any): booleanCheck if value is a guid codeOKReady
static create ( ): GuidCreate a new guidOKReady
static createEmpty ( ): GuidCreate an empty guidOKReady
static parse (guid: string): GuidCreates a guid instance from a given guid as stringOKReady
static raw ( ): stringCreate a guid code in string formatOKReady
equals (other: Guid): booleanCompare a guid codeOKReady
isEmpty ( ): booleanValidate if a guid is emptyOKReady
toString ( ): stringParse a guid instance to string formatOKReady
toJSON ( ): anyParse to JSON formatOKReady

Keywords

typescript

FAQs

Package last updated on 25 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts