Class BlobAbstract

Since

0.1

Blob is a binary large object.

Example

import Blob from '@smartface/native/blob';
var myBase64Str = "SGVsbG8gV29ybGQ=";
var blob = Blob.createFromBase64(myBase64Str);

Hierarchy

Implements

Properties

_nativeObject: any

Accessors

  • get nativeObject(): any
  • Returns any

  • set nativeObject(value: any): void
  • Parameters

    • value: any

    Returns void

  • get ios(): TProps["ios"]
  • Returns TProps["ios"]

  • get android(): TProps["android"]
  • Returns TProps["android"]

  • get type(): string
  • Returns the type of Blob data.

    Property

    Since

    0.1

    Returns string

  • get size(): number
  • Returns blob size.

    Property

    Since

    0.1

    Returns number

Methods

  • Executed before everything. This should return nativeObject since it will be assinged directly to nativeObject.

    Parameters

    • Optional params: Partial<Record<string, any>>

    Returns any

  • Parameters

    • Optional params: Partial<Record<string, any>>

    Returns void

  • Parameters

    Returns void

  • Parameters

    • props: Partial<{}>

    Returns void

  • Returns a base64 String

    Method

    toBase64

    Since

    0.1

    Returns string

  • Converts to base64 asynchronously

    Method

    toBase64Async

    Android

    Ios

    Since

    4.3.0

    Parameters

    • handlers: { onComplete: ((base64: String) => void); onFailure?: (() => void) }
      • onComplete: ((base64: String) => void)
          • (base64: String): void
          • Parameters

            • base64: String

            Returns void

      • Optional onFailure?: (() => void)
          • (): void
          • Returns void

    Returns void

    • Returns a utf8 String

    Method

    toString

    Since

    0.1

    Returns string

  • Creates a blob object from given a base64String.

    Method

    createFromBase64

    Returns

    Blob

    Static

    Since

    0.1

    Parameters

    • Base64String: string

    Returns Blob

  • Creates a blob object from given a utf8 string.

    Method

    createFromUTF8String

    Returns

    Blob

    Static

    Since

    0.1

    Parameters

    • utf8String: string

    Returns Blob

Constructors

  • Parameters

    Returns Blob

Generated using TypeDoc