npm.io
2.2.4 • Published 4 years ago

@kano/kbc-utils

Licence
ISC
Version
2.2.4
Deps
2
Size
27 kB
Vulns
1
Weekly
0

kbc-utils

Utilities modules for boilerplate apps.

Usage

import { name_of_module } from '@kano/kbc-utils'

Current Utils

  • Files

    • ExportFile

      Used for exporting different app files e.g. app.kcode or app.draw. Params include, app to be JSON.stringified to create a Blob, fileName the default file name including extension e.g. my-app.kcode, and an optional callback cb for once the export has finished.

    • ImportFile

      Used for importing different app files e.g. app.kcode or app.draw. Params include a callback cb which passes the imported file after it's loaded, and utilised in the mini app.

    • CheckBrowserCompatibility

      Checks if the browser Window has, File, FileReader, FileList and Blob needed to import and export. Params include success and fail callbacks.

  • Images

    • getBlobFromImage

    • blobToDataURL

Tracking

By Component
Component (location) Function Event / Error Name Extra Info
images GetBlobFromImage Error name: fetch_blob_from_image { stack: error in fetching blob from image, message: :error