# @kano/kbc-utils

> Utilities functionality for boilerplate mini apps

Latest version **2.2.4** (published 2021-11-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install @kano/kbc-utils
pnpm add @kano/kbc-utils
yarn add @kano/kbc-utils
bun add @kano/kbc-utils
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.2.4 |
| Published | 2021-11-26 |
| First published | 2020-04-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 27 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Kano Computing |
| Maintainers | jacobmorgan99, alicemarshall, alexfiennes, jonokano, kanocomputing, rpazdera, natseg, davidweatherall, hicksatkano, holographicleah, tomkano, onishiweb, alexb-kano, charlie-kano, wassupduck, jamie_old_plantain |

## Links

- npm: https://www.npmjs.com/package/@kano/kbc-utils
- Repository: https://github.com/KanoComputing/kano-boilerplate-components
- Issues: https://github.com/KanoComputing/kano-boilerplate-components/issues
- npm.io page: https://npm.io/package/@kano/kbc-utils

## Dependencies (2)

- [uuid](https://npm.io/package/uuid.md) ^7.0.3
- [@types/uuid](https://npm.io/package/@types/uuid.md) ^7.0.3

## Recent versions

- 2.2.4 (latest) — 2021-11-26
- 2.2.3 — 2021-11-25
- 2.2.2 — 2021-11-25
- 2.2.1 — 2021-10-01
- 2.2.0 — 2021-09-30
- 2.1.2 — 2021-06-23
- 2.1.1 — 2021-06-16
- 2.1.0 — 2021-05-06
- 2.0.1 — 2021-02-23
- 2.0.0 — 2021-01-08
- 2.0.0-pre.1 — 2021-01-06
- 2.0.0-pre.0 — 2021-01-06
- 2.0.0-alpha.0 — 2021-01-06
- 1.5.6 — 2020-12-18
- 1.5.5 — 2020-12-03
- … 29 more at https://npm.io/package/@kano/kbc-utils/versions

## 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` 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`     |

---
_Source: https://npm.io/package/@kano/kbc-utils · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
