@octra/utilities
TypeScript icon, indicating that this package has built-in type declarations

0.0.12 • Public • Published

@octra/utilities npm

This library offers JS functions and classes to make some parts of app development easier. This library is used by Octra and Octra-Backend.

Installation

ESM, CJS, TS definitions & UMD (optional)

npm install --save @octra/utilities

UMD Bundle (for Vanilla JS)

You have two options to install this package und use it as UMD:

a) Install via NPM and reference local files (no internet connection needed on production).

<script type="application/javascript" src="node_modules/@octra/utilities/index.umd.js"></script>

b) Reference remote file (internet connection needed on production).

<script type="application/javascript" src="https://unpkg.com/@octra/utilities/index.umd.js"></script>

See full example here

Use

Import

ESM, Typescript

Import the classes and functions from @octra/utilities. For example

import {getFileSize} from "@octra/utilities";

UMD Bundle

All functions and classes are available via global scope OctraUtilities. For example:

/*
make sure that you have injected the umd bundle as described before.
 */
const bytes = 738246364782
const sizeInMb = OctraUtilities.getFileSize(bytes);

API

You can find more information about classes and functions of @octra/utilities here.

Changelog

Go to changelog

Readme

Keywords

none

Package Sidebar

Install

npm i @octra/utilities

Weekly Downloads

4

Version

0.0.12

License

MIT

Unpacked Size

33.7 kB

Total Files

12

Last publish

Collaborators

  • julianpoemp