Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "Guid"

Index

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Type aliases

Accepted

Accepted: StringAccepted | ArrayBuffer | SharedArrayBuffer

Variables

Const regex

regex: RegExp = /^\w{8}(?:-\w{4}){3}-\w{12}$/

The regular expression that is used to validate a GUID string. Can be used to check that a string is a valid regex before passing it to the Guid constructor

Const regexSquareBrackets

regexSquareBrackets: RegExp = /^\[(.+)\]$/

A regular expression that can remove square brakcets from a GUID (or any string)

example
'[00112233-4455-6677-8899-aabbccddeeff]'.replace(regexSquareBrackets, '$1');
// -> `00112233-4455-6677-8899-aabbccddeeff`

Const regexSquiggleyBrackets

regexSquiggleyBrackets: RegExp = /^\{(.+)\}$/

A regular expression that can remove squiggly brakcets from a GUID (or any string)

example
'{00112233-4455-6677-8899-aabbccddeeff}'.replace(regexSquiggleyBrackets, '$1');
// -> `00112233-4455-6677-8899-aabbccddeeff`

Functions

convert

fromBuffer

  • fromBuffer(value: ArrayBuffer | SharedArrayBuffer, endianness?: Endianness): string
  • Parameters

    • value: ArrayBuffer | SharedArrayBuffer
    • Default value endianness: Endianness = Endianness.Big

    Returns string

isAccepted

  • isAccepted(o: any): boolean
  • Parameters

    • o: any

    Returns boolean

parse

toBuffer

  • toBuffer(value: string, endianness?: Endianness): ArrayBuffer | SharedArrayBuffer
  • Parameters

    • value: string
    • Default value endianness: Endianness = Endianness.Big

    Returns ArrayBuffer | SharedArrayBuffer