4.4.1 • Published 3 years ago

@labor-digital/helferlein v4.4.1

Weekly downloads
47
License
Apache-2.0
Repository
github
Last release
3 years ago

LABOR - Helferlein

"Helferlein" is german and means: Small Helper

This javascript package contains a number of helper functions and their typescript definitions. Not all implementations are written by us; all external, included code is annotated with it's source.

All helpers should be able to run in a node.js context, as well as in the browser and even a SSR context without any issues.

Installation

Install this package using npm:

npm install @labor-digital/helferlein

Usage

In a module environment (webpack/typescript)

The helpers are distributed as loosely coupled components, that are tree-shakable by modern building tools like webpack. So you can simply load what you need directly from your code

import {asArray} from "@labor-digital/helferlein";

const objectAsArray = asArray({'a': 1, 'b': 2, 'd': 3, 'e': 'asdf'});

As scrip in a browser

You can also load the pre-build sources directly in your browser. You don't need any bundler for that, just look inside the dist.browser directory.

Load only some helpers

Each helper is available in a standalone file. That way you can load either a single helper, or two, or three. Each loaded helper, will be added to the global " Helferlein" object.

<script type="text/javascript" src="../dist.browser/Helferlein.types.isArray.js"></script>
<script type="text/javascript" src="../dist.browser/Helferlein.types.isString.js"></script>
<script type="text/javascript">
    console.log('Is string', Helferlein.isString('true'), '<- true | false ->', Helferlein.isString(false));
    console.log('Is array', Helferlein.isArray([]), '<- true | false ->', Helferlein.isString(false));
</script>

Load all helpers

Alternatively you can load all available helpers at once using the "Helferlein.all.js" file.

<script type="text/javascript" src="../dist.browser/Helferlein.all.js"></script>
<script type="text/javascript">
    console.log('Is string', Helferlein.isString('true'), '<- true | false ->', Helferlein.isString(false));
    console.log('Is array', Helferlein.isArray([]), '<- true | false ->', Helferlein.isString(false));
</script>

Documentation

The documentation / API can be found here but is also rendered at "./doc/index.html" for local usage

Postcardware

You're free to use this package, but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.

Our address is: LABOR.digital - Fischtorplatz 21 - 55116 Mainz, Germany

We publish all received postcards on our company website.

4.4.1

3 years ago

4.4.0

3 years ago

4.3.1

3 years ago

4.3.0

3 years ago

4.2.0

3 years ago

4.1.0

3 years ago

4.0.6

3 years ago

4.0.5

3 years ago

4.0.4

3 years ago

3.35.1

3 years ago

3.35.0

3 years ago

4.0.1

3 years ago

4.0.0

3 years ago

4.0.2

3 years ago

3.34.0

3 years ago

3.33.0

3 years ago

3.33.1

3 years ago

3.32.1

3 years ago

3.32.0

3 years ago

3.31.5

3 years ago

3.31.3

3 years ago

3.31.4

3 years ago

3.31.2

3 years ago

3.31.1

3 years ago

3.31.0

3 years ago

3.30.1

3 years ago

3.30.0

3 years ago

3.29.0

3 years ago

3.28.0

3 years ago

3.27.0

3 years ago

3.26.0

3 years ago

3.25.0

4 years ago

3.24.0

4 years ago

3.22.0

4 years ago

3.23.1

4 years ago

3.23.0

4 years ago

3.21.0

4 years ago

3.20.2

4 years ago

3.20.1

4 years ago

3.20.0

4 years ago

3.19.0

4 years ago

3.19.2

4 years ago

3.19.1

4 years ago

3.18.0

4 years ago

3.17.7

4 years ago

3.17.6

4 years ago

3.17.5

4 years ago

3.17.4

4 years ago

3.17.3

4 years ago

3.17.2

4 years ago

3.17.1

4 years ago