open-index/open-npm huggingface dataset:
npm package: @smplygd/focuspoint-loader
Description: Lazyloading for Focuspoint images.
Author: smply.gd GmbH
Latest version: 1.1.0

# smply.gd Focuspoint Loader
Lazyloading for Focuspoint images. This autoload script uses the [jQuery focuspoint plugin](https://github.com/jonom/jquery-focuspoint) by [Jono Menz](https://github.com/jonom) and provides additional helper methods to properly init your focuspoint images with a comprehensive API.

## Installation

Install via npm `npm install @smplygd/focuspoint-loader --save`. Depends on the focuspoint plugin and jQuery.

## Markup
Use the [basic focuspoint markup](https://github.com/jonom/jquery-focuspoint#3-mark-up-your-image-container) for basic functionality:

```html
<div class="focuspoint" data-focus-x="0" data-focus-y="0" data-image-w="400" data-image-h="300">
    <img src="/path/to/image.jpg" />
</div>
```

**Example with lazy loading:**

This is not part of the original plugin functionality, this script provides this functionality. Provide an 
additional `data-image` attribute with the path to your focuspoint image. We recommend to place the 
`<img />` tag with a 1x1 transparent gif, so you don't have to extra load any placeholder images.
THe script will then exchange the image paths, wait for the image to load and then initialize
the focuspoint plugin.
```html
 <div class="focuspoint" data-focus-x="0" data-focus-y="0" data-image="/path/to/image.jpg" data-image-w="400" data-image-h="300">
    <img src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=" />
 </div>
```

## Usage
Include file in your script file and run `SGFocuspointLoader.init();`. You may use the options below to 
override the base settings. The `init()` method will automatically init all focuspoint images with 
the `.focuspoint` class.

Further you can initialize additional elements or reinitialize if dimensions have changed using the
`SGFocuspointLoader.initElements( elements );` method. We use this method to reinitialize
focuspoint elements inside sliders so the focuspoint gets calculated correctly after the
slider has been initialized or after you appended some AJAX html which contains focuspoint elements.

You may pass a NodeList or a jQuery collection.

You can also you `initElement( element )` to just initialize one source. You can pass any argument that
either is an jQuery instance or may be wrapped into a jQuery instance. 

The difference between both is that `initElements` initializes each node individually 
calling the `initElement` method on each item.


### Options
You may provide additional options and overrides via an object passed to the `init({})` 
method. Here is a list of all available options and their default values:

```javascript
SGFocuspointLoader.init({
    // Provide a selector that should trigger the autoloading of
    // focuspoint images
    triggerSelector: ".focuspoint",
});
```
npm package: @smpx/babel-changed
Description: Only compile changed files with babel
Author: Rohit Gohri
Latest version: 0.6.1

# babel-changed

[![Version](https://img.shields.io/npm/v/@smpx/babel-changed.svg)](https://www.npmjs.com/package/@smpx/babel-changed)
[![Downloads](https://img.shields.io/npm/dm/@smpx/babel-changed.svg)](https://www.npmjs.com/package/@smpx/babel-changed)
[![License](https://img.shields.io/npm/l/@smpx/babel-changed.svg)](https://www.npmjs.com/package/@smpx/babel-changed)
[![Dependencies](https://david-dm.org/smartprix/babel-changed/status.svg)](https://david-dm.org/smartprix/babel-changed)
[![Dev Dependencies](https://david-dm.org/smartprix/babel-changed/dev-status.svg)](https://david-dm.org/smartprix/babel-changed?type=dev)

A command line tool that only compiles changed files with babel.

## Install

Globally:

```sh
npm install -g @smpx/babel-changed
# OR
yarn global add @smpx/babel-changed
```

Or locally:

```sh
npm install @smpx/babel-changed --save-dev
# OR
yarn add @smpx/babel-changed --dev
```

## Use

Default source directory is `src` and default out directory is `dist`

```sh
babel-changed
# Output
[babel] compiling 1 files
babel-changed: 1413.925ms
```

### See Options & Help

```sh
bebel-changed -h

Usage: babel-changed [options]

Options:
  -V, --version                output the version number
  -s, --src [dir]              Specify Source Directory (default: "src")
  -d, --dest [dir]             Specify Destination Directory (default: "dist")
  -f, --file-glob [pattern]    Glob pattern to match files in source directory
                               (default: "**/*.*" (all files))
  -i, --ignore-glob [pattern]  Glob pattern to match files to ignore
                               (default: "**/node_modules/**" (ignore all files inside node_modules))
  -e, --extensions <exts>      Extensions to compile (comma separated) (default: ".js")
  -m, --source-maps [boolean]  Enable source maps (default: true)
  -c, --copy [boolean]         Copy files other than .js files (default: true)
  -h, --help                   output usage information
```

### Using with options

If your source directory is `source` destination directory is `out` then use

```sh
babel-changed -s source -d out
```

### Extensions/Typescript support

For compiling TS/JSX files with babel, change the extensions to compile like below:

```sh
babel-changed -e ".js,.ts"
```

**NOTE**: Extension of compiled file will always be `.js`.
npm package: @smpx/knex-utils
Description: Some utilities using knex to create and manage DBs
Author: Rohit Gohri
Latest version: 1.1.8

<a href="https://www.npmjs.com/package/@smpx/knex-utils"><img src="https://img.shields.io/npm/v/@smpx/knex-utils.svg" alt="Version"></a>
<a href="https://www.npmjs.com/package/@smpx/knex-utils"><img src="https://img.shields.io/npm/dm/@smpx/knex-utils.svg" alt="Downloads"></a>
<a href="https://www.npmjs.com/package/@smpx/knex-utils"><img src="https://img.shields.io/npm/l/@smpx/knex-utils.svg" alt="License"></a>
<a href="https://david-dm.org/smartprix/knex-utils"><img src="https://david-dm.org/smartprix/knex-utils/status.svg" alt="Dependencies"></a>
<a href="https://david-dm.org/smartprix/knex-utils?type=dev"><img src="https://david-dm.org/smartprix/knex-utils/dev-status.svg" alt="Dev Dependencies"></a>

# knex-utils

It is a set of utility functions for use with knex and knex migrations. Mostly aimed at PostgreSQL.

## CLI:

```
Usage: knex-utils [options] [command]

Options:
  -V, --version     output the version number
  -h, --help        output usage information

Commands:
  refresh
  create [options]
```

### For `knex-utils create` :
```
Usage: knex-utils create [options]

Options:
  -m, --migrate  Run migrations too after creating DB
  -h, --help     output usage information
```

## KnexFile:

The cwd should have a knexfile.js, this is used by knex to connect to the DB.

Reference : https://knexjs.org/#knexfile


## Consolidate:

** ONLY WORKS WITH POSTGRESQL **

Tool to consolidate all existing schema migrations into one migration and corresponding tables folder with one file for each table.

### Supported types for columns:

- integer
- increments
- string
- jsonb
- timestamp
- text
- boolean
- float
- decimal
- enum
- specificType :
	- citext

### Supported Modifiers:

- unique
- index
- primary
- composite primary keys
- nullable
- notNullable
- defaultTo
- maxLength for string
- numeric_precision for numeric
		
### TODO: 

- Handle Partitions:
  - Could look at code for [Migra](https://github.com/djrobstep/migra)
  - https://dba.stackexchange.com/questions/40441/get-all-partition-names-for-a-table

### Not supported (for now?):
- Custom indexes not on columns directly
- Functions
- native types
npm package: @smpx/notify
Description: A generic notification message builder and sender, supports slack
Author: Rohit Gohri
Latest version: 0.5.3

<a href="https://www.npmjs.com/package/@smpx/notify"><img src="https://img.shields.io/npm/v/@smpx/notify.svg" alt="Version"></a>
<a href="https://www.npmjs.com/package/@smpx/notify"><img src="https://img.shields.io/npm/dm/@smpx/notify.svg" alt="Downloads"></a>
<a href="https://www.npmjs.com/package/@smpx/notify"><img src="https://img.shields.io/npm/l/@smpx/notify.svg" alt="License"></a>
<a href="https://david-dm.org/smartprix/notify"><img src="https://david-dm.org/smartprix/notify/status.svg" alt="Dependencies"></a>
<a href="https://david-dm.org/smartprix/notify?type=dev"><img src="https://david-dm.org/smartprix/notify/dev-status.svg" alt="Dev Dependencies"></a>

# Notify

It is a message builder for sending notifications and alerts.

Currently supports slack.


## Slack

Works both with legacy tokens and incoming webhooks.

Use a `config.js` file to set token/webhook or use the static functions in the class to set them before sending a message.

Priority is given to webhook if available else token is used.
npm package: @smpx/slack
Description: A slack message builder and sender
Author: Rohit Gohri
Latest version: 0.2.4
Deprecated: renamed to @smpx/notify

<a href="https://www.npmjs.com/package/@smpx/slack"><img src="https://img.shields.io/npm/v/@smpx/slack.svg" alt="Version"></a>
<a href="https://www.npmjs.com/package/@smpx/slack"><img src="https://img.shields.io/npm/dm/@smpx/slack.svg" alt="Downloads"></a>
<a href="https://www.npmjs.com/package/@smpx/slack"><img src="https://img.shields.io/npm/l/@smpx/slack.svg" alt="License"></a>
<a href="https://david-dm.org/smartprix/slack-utils"><img src="https://david-dm.org/smartprix/slack-utils/status.svg" alt="Dependencies"></a>
<a href="https://david-dm.org/smartprix/slack-utils?type=dev"><img src="https://david-dm.org/smartprix/slack-utils/dev-status.svg" alt="Dev Dependencies"></a>

# Slack-Utils

It is a set of utility functions for sending messages to Slack

Works both with legacy tokens and incoming webhooks.

Use a `config.js` file to set token/webhook or use the static functions in the class to set them before sending a message.

Priority is given to webhook if available else token is used.
npm package: @smpx/tail
Description: Watch and tail a file in nodejs
Author: Hitesh Khandelwal
Latest version: 0.1.0

# @smpx/tail
Watch and tail a file in nodejs `tail -f -n` &nbsp; &nbsp; 🎉 **No Dependencies**

### Install
```sh
npm install @smpx/tail
```

Or with yarn:
```sh
yarn add @smpx/tail
```

### Use
```js
const tail = require('@smpx/tail');

const stream = tail('/var/log/syslog', {
    numLines: 20,
    watch: true,
});

stream.on('line', (line) => {
    console.log(line);
});

stream.on('error', (err) => {
    console.error(err);
});
```

If you want to stop watching:
```js
stream.close();
```


### API

#### tail(filename, options)
* `filename`: Path of the file to tail
* `options`:
  * `bufferSize`: Use this bufferSize when reading from the file (default `2048`)
  * `encoding`: Encoding of the file (default `utf8`)
  * `numLines`: Number of lines to read initially (default `10`) (similar to `tail -n`)
  * `watch`: Whether to watch the file for changes (default `false`) (similar to `tail -f`)
    * Setting this to true will keep the process alive until you call `close`
  * `filter`: An optional function to emit only those lines which pass the criteria
    ```js
    const stream = tail('/var/log/syslog', {
        numLines: 20,
        watch: true,
        filter: (line) => {
            if (!line) return false;
            return JSON.parse(line).level === 'error';
        }
    });
    ```

**Returns**:

An eventemitter, with two events, `line` and `error` and a function `close`.

* `on('line', (line) => {})`: emitted whenever we read a new line from the file
* `on('error', (err) => {})`: emitted whenever there's an error
* `close`: a method to close and unwatch the file

### LICENSE

MIT