@kano/kbc-utils
v2.2.4
Published
Utilities functionality for boilerplate mini apps
Downloads
17
Maintainers
Keywords
Readme
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
orapp.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 callbackcb
for once the export has finished.ImportFile
Used for importing different app files e.g.
app.kcode
orapp.draw
. Params include a callbackcb
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
andBlob
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
|