open-index/open-npm huggingface dataset:
npm package: @schwad_rb/time-ago-in-words
Description: A JS clone of Rails' time_ago_in_words
Author: Nick Schwaderer
Latest version: 1.0.1

# @schwad_rb/time-ago-in-words

## [Attribution](https://stackoverflow.com/questions/6108819/javascript-timestamp-to-relative-time/53800501#53800501)

I wanted Rails' time_ago_in_words in Javascript. [There was a stackoverflow answer](https://stackoverflow.com/questions/6108819/javascript-timestamp-to-relative-time/53800501#53800501) which pretty much gave us that. So I packaged it. Thanks @vsync

## Usage

Pass in a date object. Voila 

```javascript
timeAgoInWords(new Date('2022-01-01'))

// #=> '3 months ago'
```
npm package: @schwarz.nicolas/android-print-pdf-cordova
Description: Android Print PDF for Cordova based on cordova-print-pdf-plugin by Sarah Goldman
Author: Nicolas Schwarz
Latest version: 1.0.0

# Print PDF plugin for Cordova / PhoneGap now in landscape!

This plugin is a fork from: [sarahgoldman](https://github.com/sarahgoldman/cordova-print-pdf-plugin), modified to fit a specific use case.

This plugin brings up a native overlay to print a PDF document using [AirPrint](http://en.wikipedia.org/wiki/AirPrint) for iOS and Android Printing APIs on Android devices running 4.4 (API 19) or later. For Android devices running 4.3 or less, it will open a Google Cloud Print dialog.

## Usage

### print(options)

Use the `print` function to print an encoded document via a native printing interface.

```
window.plugins.PrintPDF.print(options);
```

The default options object

```
var options = {

	data: null, 				// content, either base64 string or file uri (required)
								// (omit "data:application/pdf;base64," part from base64 string)

	type: 'Data',				// type of content, use either 'Data' or 'File'

	title: 'Print Document', 	// title of document

	dialogX: -1,				// if a dialog coord is not set, it defaults to -1.
								// the iOS method will fall back to center if it gets
	dialogY: -1,				// a dialog coord less than 0. (iPad only)

	success: null,				// success callback function, argument is a json string.
	 							// parsed json format:
								// {success: true}

	error: null					// error callback function, argument is a json string.
	 							// parsed json format:
								// {success: [boolean], available: [boolean], error: [string], dismissed: [boolean]}

};
```

#### Example:

```
var encodedString = 'base64encodedStringHere';
window.plugins.PrintPDF.print({
	data: encodedString,
	type: 'Data',
	title: 'Print Document',
	success: function(){
		console.log('success');
	},
	error: function(data){
		data = JSON.parse(data);
		console.log('failed: ' + data.error);
	}
});
```

### dismiss()

Use the `dismiss` function to programmatically dismiss the print dialog (iOS only). There are no options that can be passed in. When the dialog is dismissed it will trigger the error callback that was set for the `print()` function with the `dismissed` parameter set to `true`.

```
window.plugins.PrintPDF.dismiss();
```

### isPrintingAvailable(callback)

Use the `isPrintingAvailable` function to check if native printing is supported and available.

```
window.plugins.PrintPDF.isPrintingAvailable(callback);
```

#### Example:

```
window.plugins.PrintPDF.isPrintingAvailable( function(isAvailable) {
	console.log('printing is available: '+ isAvailable);
});
```
npm package: @schwarz.nicolas/linea-rs-plugin
Description: Plugin for communicating with linea products
Author: Gery Hirschfeld
Latest version: 3.0.2

# README #

This README explains how to install and use the Linea NPM Plugin and which changes where done.

### What is this repository for? ###

* How to install
* How to use

### How to install ###

#### Via command line
* Use this command in your projects terminal

``` npm install git+https://NicolasSchwarz@bitbucket.org/NicolasSchwarz/linea_npm_plugin.git ```

#### Via dependencies
* Add following line to your dependencies section your package.json file

``` "linea-pro-cdv" : "git+https://NicolasSchwarz@bitbucket.org/NicolasSchwarz/linea_npm_plugin.git" ```


### How to use ###

#### Quick start
To start plugin need to execute 'LineaProCDV.initDT()' method.
Recommended to add this into 'deviceready' handler.

#### Add Items
You must add section "SupportedExternalAccessoryProtocols" into "[Project Name].plist" file.
This section should include the following items:

* com.datecs.linea.pro.msr
* com.datecs.iserial.communication
* com.datecs.pinpad
* com.datecs.linea.pro.bar

### Changes ###
* Updated Links in kackage.json and plugin.xml
* Later on, files will be updated in src
npm package: @schwarz.nicolas/linea-rs-plugin-dev
Description: Plugin for communicating with linea products - New developments
Author: Gery Hirschfeld
Latest version: 1.1.8

# README #

This README explains how to install and use the Linea NPM Plugin and which changes where done.

### What is this repository for? ###

* How to install
* How to use

### How to install ###

#### Via command line
* Use this command in your projects terminal

``` npm install git+https://NicolasSchwarz@bitbucket.org/NicolasSchwarz/linea_npm_plugin_dev.git ```

#### Via dependencies
* Add following line to your dependencies section your package.json file

``` "linea-pro-cdv" : "git+https://NicolasSchwarz@bitbucket.org/NicolasSchwarz/linea_npm_plugin_dev.git" ```


### How to use ###

#### Quick start
To start plugin need to execute 'LineaProCDV.initDT()' method.
Recommended to add this into 'deviceready' handler.

#### Add Items
You must add section "SupportedExternalAccessoryProtocols" into "[Project Name].plist" file.
This section should include the following items:

* com.datecs.linea.pro.msr
* com.datecs.iserial.communication
* com.datecs.pinpad
* com.datecs.linea.pro.bar

### Changes ###
* Updated Links in package.json and plugin.xml
* Later on, files will be updated in src
npm package: @schwarzit/runs-on-stackit
Description: With the STACKIT-Badge you can mark internal and external websites and applications that run on, are sponsored or supported by STACKIT.
Latest version: 0.0.8-fix

![Built With Stencil](https://img.shields.io/badge/-Built%20With%20Stencil-16161d.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjIuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI%2BCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI%2BCgkuc3Qwe2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU%2BCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MjQuNywzNzMuOWMwLDM3LjYtNTUuMSw2OC42LTkyLjcsNjguNkgxODAuNGMtMzcuOSwwLTkyLjctMzAuNy05Mi43LTY4LjZ2LTMuNmgzMzYuOVYzNzMuOXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTQyNC43LDI5Mi4xSDE4MC40Yy0zNy42LDAtOTIuNy0zMS05Mi43LTY4LjZ2LTMuNkgzMzJjMzcuNiwwLDkyLjcsMzEsOTIuNyw2OC42VjI5Mi4xeiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNDI0LjcsMTQxLjdIODcuN3YtMy42YzAtMzcuNiw1NC44LTY4LjYsOTIuNy02OC42SDMzMmMzNy45LDAsOTIuNywzMC43LDkyLjcsNjguNlYxNDEuN3oiLz4KPC9zdmc%2BCg%3D%3D&colorA=16161d&style=flat-square)
[![SIT](https://img.shields.io/badge/SIT-awesome-blueviolet.svg)](https://jobs.schwarz)

# runs-on-stackit
With the STACKIT-Badge you can mark internal and external websites and applications that run on, are sponsored or supported by STACKIT.

There are three different types of STACKIT badges.

* Badge
* Ribbon
* Flag

To use them in your project just drop add the library via NPM and add following snippets in your code:

    <stackit-badge></stackit-badge>
    
    <stackit-badge badge-type="ribbon"></stackit-badge>

    <stackit-badge badge-type="flag"></stackit-badge>
    
You can configure the badge color and hosting type with ```badge-color``` and ```hosting-type```

     <stackit-badge badge-type="flag" badge-color="yellow"></stackit-badge>

     <stackit-badge hosting-type="poweredby" badge-color="yellow"></stackit-badge>
     
Attention: The color ```white``` is only working on the badge of type ```flag``` and ```poweredby``` is only available for badges of type ```badge```
npm package: @schwingbat/math2
Description: A collection of helpful math functions that should have been included in the JS standard library.
Author: Tony McCoy
Latest version: 1.1.0

# Math2.js

A simple collection of utility functions that should be in the JS Math object but aren't. I'll be adding to the list as I need them.

The current functions available are:

### range
`Math2.range(low, high[, round])`

Returns a number between specified low and high ranges. Optionally rounded if the third parameter is `true`.

```javascript
Math2.range(1, 10) // => 3.6221051
Math2.range(1, 50, true) // => 44

// It's essentially the same as:
Math.random() * (high - low) + low;
// ...but much easier to remember.
```

### clamp
`Math2.clamp(number, low, high)`

Takes a number, a low bound and a high bound and clamps the number within that range.

```javascript
// It's shorthand for this:
Math.min(10, Math.max(1, 16))

// because people always reverse the numbers and it requires some mental overhead to figure it out (at least for me).

// So if you want to make sure a number is limited to a range between 1 and 10, you can do this instead:
Math2.clamp(16, 1, 10);
```

### encomma
`Math2.encomma(number[, delimiter])`

Adds commas (or other delimiter of choice) at proper spaces to make larger numbers easier to read. Takes a number or a string and returns a string.

It also strips commas as part of its process, which has the nice side effect of fixing improperly placed commas.

Also there might be a real name for this process. If you know it, let me know.

```javascript
Math2.encomma(100000000) // => 100,000,000
Math2.encomma("1,23456,7", "!") // => 1!234!567
```

### decomma
`Math2.decomma(number)`

Takes a string and strips the commas, returning a number. It's like `encomma` in reverse.

```javascript
Math2.decomma("100,000,000") // => 100000000
```
npm package: @schwingbat/microtween
Description: A super simple tweening library
Author: Tony McCoy
Latest version: 1.0.1

# microtween

microtween is a tiny tweening library based on cubic bezier curves. It's a tweening API built on a slightly modified version of [gre/bezier-easing](https://github.com/gre/bezier-easing).

```js
const tween = microtween({
  from: { x: 0,   y: 100 },
  to:   { x: 100, y: 0   },
  time: 3000,
  update: props => {
    element.style.transform = `translate(${props.x}px, ${props.y}px)`
  }
}).then(props => {
  // Do something at the end
})
```

The `update` function is called within `requestAnimationFrame`, so you're free to update styles and DOM elements without causing major performance issues.

You can use the default easing, specify a built in easing, or define your own on the fly:

```js
// By reference
microtween({
  // ...
  easing: microtween.ease.elastic
})

// By name
microtween({
  // ...
  easing: 'circular'
})

// By value
microtween({
  // ...
  easing: [0.53, 1, 0.15, 1.2]
})
```

## Included Curves

These are the included curves:

- default (`0.25`, `0.12`, `0.31`, `1`)
- linear (`0`, `0`, `1`, `1`)
- easeOut (`0`, `0`, `0.58`, `1`)
- circular (`0`, `0.6`, `0.4`, `1`)
- elastic (`0.53`, `1`, `0.15`, `1.2`)
- elasticStrong (`0.75`, `-0.5`, `0`, `1.75`)
- expo (`0.19`, `0.85`, `0.64`, `1.01`)

[cubic-bezier.com](http://cubic-bezier.com) is an awesome tool to check out if you're interested in creating your own.

## Project Status

microtween is currently not actively developed, but it is in active use in a few of my projects.
npm package: @schwingbat/relative-angle
Description: Calculate the angle from one set of XY coordinates to another in degrees or radians.
Author: Tony McCoy
Latest version: 1.0.0

# relative-angle

Calculate the angle between two sets of XY coordinates. Useful for getting the angle of the mouse from a particular object on screen, for example.

```javascript

const getDegrees = require("@schwingbat/relative-angle").degrees;
const getRadians = require("@schwingbat/relative-angle").radians;

const pointOne = {
	x: 612,
	y: 314
}

const pointTwo = {
	x: 1128,
	y: 851
}

console.log(getDegrees(pointOne, pointTwo)); // 46.14249942304433 degrees
console.log(getRadians(pointOne, pointTwo)); // 0.8053385400317074 radians

```
npm package: @schwingbat/wunderscore
Description: Extremely lightweight underscore-like utility library with only the basics.
Author: Tony McCoy
Latest version: 1.5.0

# WUNDERSCORE
### v1.5.0

It's like Underscore and lodash, but less fat. I love those libraries, but I only use a fraction of what they offer, and it's almost always the same stuff. Here's that stuff. It's also in ES6 module format, so tree shaking can be used to remove the stuff you don't need.