Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/labor-digital/helferlein
General purpose Javascript helpers
https://github.com/labor-digital/helferlein
javascript typescript
Last synced: about 1 month ago
JSON representation
General purpose Javascript helpers
- Host: GitHub
- URL: https://github.com/labor-digital/helferlein
- Owner: labor-digital
- License: apache-2.0
- Created: 2020-02-17T12:25:26.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-14T16:52:53.000Z (almost 2 years ago)
- Last Synced: 2024-10-31T15:12:25.676Z (2 months ago)
- Topics: javascript, typescript
- Language: TypeScript
- Size: 3.73 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 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```js
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.```html
console.log('Is string', Helferlein.isString('true'), '<- true | false ->', Helferlein.isString(false));
console.log('Is array', Helferlein.isArray([]), '<- true | false ->', Helferlein.isString(false));```
#### Load all helpers
Alternatively you can load all available helpers at once using the "Helferlein.all.js" file.
```html
console.log('Is string', Helferlein.isString('true'), '<- true | false ->', Helferlein.isString(false));
console.log('Is array', Helferlein.isArray([]), '<- true | false ->', Helferlein.isString(false));```
## Documentation
The documentation / API can be found [here](http://helferlein.labor.tools/) 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](https://labor.digital).