open-index/open-npm huggingface dataset:
npm package: @peter-schweitzer/ezserver
Description: BLAZINGLY FAST npm module for backend/REST-API development with 0! dependencies, inspired by express
Author: Peter Schweitzer
Latest version: 6.0.0

# EZServer

simple, ultra light weight node.js module with (basically) 0 dependencies for simple backend/REST-API development
_all implemented in around a thousand lines or less_

> EZServer is developed on the current node version (v25)
> but should run on all active LTS versions

## Resolving requests

The most basic way of resolving a request is using the 'add' function of the app.
Eg. to resolve a request to `/myRequest` and respond with `Hello World!` do the following:

```js
import { App, buildRes, MIME } from '@peter-schweitzer/ezserver';

const app = new App();

app.add('/hello-world', function (_req, res, _params) => {
  buildRes(res, 'Hello, World!', { mime: MIME.TEXT });
});

app.listen(8080);
```

on `localhost:8080/hello-world` you should see the text "Hello, World!"

The `req`-Object is passed from the node:http server, but is slightly modified.<br>
EZServer adds the property `uri`, which is very similar to req.url, but URI-decoded and <i style="color: #ff2020">without</i> a query string.<br>
To provide correct type annotations for the `req`-Object the `EZIncomingMessage` type is used.

> for further documentation refer to the [example](./example/index.js)
npm package: @peter.ingram/sections
Description: A tiny 4kb class (with no dependencies) to detect the page section the user is on as well as spy on fixed page elements to run events against based on the page sections (when the element starts to change between a section, the middle and the end of the se
Author: Peter Ingram
Latest version: 1.1.4

# Sections

A tiny 4kb class (with no dependencies) to detect the page section the user is on as well as spy on fixed page elements to run events against based on the page sections (when the element starts to change between a section, the middle and the end of the section).

The library can be used to trigger events on the sections based on the users scroll position as well as trigger events on fixed elements related to the main sections.

[Demo](https://peteringram0.github.io/sections/)

## Usage: 
````typescript
new Sections({selector: '.sections'})
  .sectionStarted((section, direction) => {
    /**
     triggered when the section changes.
     */
  })
  .elementEvent(element, (eventType, direction, currentSection) => {
    /**
     add element event. Pass in the element and the method gets triggered when the element starts, the middle and the end meets the section's based on the section selector in the constructor. The direction and current section the user is on are provided into the method. This method is chainable.
     */
  })
````

### Options
You are able to pass options when setting up Sections. These have default values and are optional.
````typescript
export interface Options {
  selector: string
  scrollEventBounce: number
  resizeEventBounce: number
}
````

### sectionStarted
A section and a direction are provided:
````typescript
interface SectionInterface {
  index: number
  from: number
  to: number
  classList: string[]
}

enum Direction {
  UP = 'up',
  DOWN = 'down'
}
````

### elementEvent
Pass in your fixed element and the method will return the following based on the related position to the sections:
````typescript
enum EventType {
  START = 'start',
  MIDDLE = 'middle',
  END = 'end'
}

enum Direction {
  UP = 'up',
  DOWN = 'down'
}

interface SectionInterface {
  index: number
  from: number
  to: number
  classList: string[]
}
````

### Yarn / NPM:
````bash
yarn add @peter.ingram/sections
````
npm package: @peter.mihalik/angular-spec-generator
Description: Generate angular spec files with mocks initialized automatically.
Author: Peter Mihalik
Latest version: 1.0.1

# Angular spec generator

This project represents a utility that generates Angular spec files for components, services, directives and pipes.
In addition to the standard spec files that are generated when using angular cli schematics, 
this utility also generates mocks based on the constructor parameters.
It uses the `ts-mocks` library to generate the mocks.

## Installation

```bash
npm install -g @peter.mihalik/angular-spec-generator
```

## Usage
    
```bash
asg generate -f <file_path>
```
or
```bash
asg generate --file <file_path>
```
The `file_path` is the path to the file that you want to generate the spec file for.
The file that will be generated will have the same name as the original file, but with the `.spec.ts` suffix.
Should the file already exist, an index starting at 1 will be appended to the file name.
npm package: @peter.mihalik/engagement-frontend-utils
Description: Utilities to make our life on frontend easier.
Author: peter.mihalik@gmail.com
Latest version: 0.1.6

# engagement-frontend-utils

A collection of frontend tools that will make our lives easier.

## Installation

```
npm i -g @peter.mihalik/engagement-frontend-utils
```

## Commands

### `lt`
`lt` stands for **latest tag**. It will print out the name of the
latest semver tag that has been used in the specific git directory 
where it is invoked from. 

#### Usage
```
lt [version]
``` 
`lt` support an optional `version` argument that enables you to filter
the tags you would like to search through. It filters the tags using
`starts with`.
npm package: @peter.naydenov/deep-copy
Description: Immutable copies of javascript objects and arrays
Author: Peter Naydenov
Latest version: 2.0.0

# Deep copy ( @peter.naydenov/deep-copy)

Creates an immutable copies of javascript data structures.

## Installation

Install for node.js projects by writing in your terminal:
```
npm install @peter.naydenov/deep-copy
```

Once it has been installed, it can be used by writing this line of JavaScript:

```js
let deepCopy = require ( '@peter.naydenov/deep-copy' )
```
or

```js
import deepCopy from '@peter.naydenov/deep-copy'
```



**Installation for browsers**: Execute script '`npm run build`' in the console. Then grab file "`dist/deep-copy.min.js`" and put it inside the project. Request the file from HTML page. Global variable 'deepCopy' is available for use.


            Note:
            Library is using 'generator functions'. If support for old browsers 
            is required, add a polyfill for 'generators'.










# How it use it?

```js
let 
      x = {
              ls   : [ 1,2,3 ]
            , name : 'Peter'
            , props : {
                          eyeColor: 'blue'
                        , age     : 47
                        , height  : 176
                        , sizes : [12,33,12,21]
                    }
            }
    , r = deepCopy ( x )
    ;
r.props.sizes.push ( 66 )   // will not change x.props.sizes
x.props.sizes[0] = 222222   // will not change r.props.sizes[0]
x.props.test = 'hello'      // will not create `test` in r.props
// Data-structures 'x' and 'r' are completely decoupled
```





## Links
- [Release history](Changelog.md)
- [Dt-toolbox: Execute more complex operations over data structures.](https://github.com/PeterNaydenov/dt-toolbox)



## Credits
'@peter.naydenov/deep-copy' was created and supported by Peter Naydenov.



## License
'@peter.naydenov/deep-copy' is released under the [MIT License](http://opensource.org/licenses/MIT).
npm package: @peter.naydenov/dt-queries
Description: Set of DT-toolbox query functions
Author: Peter Naydenov
Latest version: 1.1.1

# DT Queries

**Note**: Set of DT-toolbox query functions. You can use them for **learning purposes** or inspiration for how to build your own query functions for DT-Toolbox.


## How to use the library

Library is a list of functions and you can take only the needed one.

```js
import dtbox from 'dt-toolbox'
import { identical } from '@peter.naydenov/dt-queries'
// or require it:
// const identical = require ( '@peter.naydenov/dt-queries').identical;

const dt = dtbox.init ( a ) // a is some standard JS object
const result = dt.query ( identical, otherDtObject )  
// 'identiacal' query function expect one extra argument, that should be a dt-object
```





## Query functions

### Merge operations
- Add
- Update
- Overwrite
- Insert
- Append
- Prepend
- Combine



### Compare operations
- Identical
- Change
- Different
- Missing
- Same



### Extract operations
- Keep segments
- Remove segments



### Segment Operations
- SplitSegments: Splits a solid data into multiple data-segments;
- JoinSegments : Consolidate multiple data-segments in a single solid data;
- updateState  : Updates the state with new data. Takes only declared data-segments and root data properties;



## External Links
- [DT-toolbox](https://github.com/PeterNaydenov/dt-toolbox)


## Credits
'@peter.naydenov/dt-queries' was created and supported by Peter Naydenov.



## License
'@peter.naydenov/dt-queries' is released under the [MIT License](http://opensource.org/licenses/MIT).
npm package: @peter.naydenov/literal-toolbox
Description: A collection of tag functions designed to transform string literals into dynamic render functions.
Author: Peter Naydenov
Latest version: 1.1.0

# literal-toolbox (@peter.naydenov/literal-toolbox)

![version](https://img.shields.io/github/package-json/v/peterNaydenov/literal-toolbox)
![license](https://img.shields.io/github/license/peterNaydenov/literal-toolbox)
![GitHub issues](https://img.shields.io/github/issues/peterNaydenov/literal-toolbox)
![GitHub top language](https://img.shields.io/github/languages/top/peterNaydenov/literal-toolbox)
![npm package minimized gzipped size (scoped)](https://img.shields.io/bundlejs/size/%40peter.naydenov/literal-toolbox)



A collection of tag functions designed to transform string literals into dynamic render functions.



## Installation

```bash
npm install @peter.naydenov/literal-toolbox
```



## Usage


Use function `obj` when you will name your placeholders and will provide data as an object.
```js
import literal from '@peter.naydenov/literal-toolbox'

const templateFn = literal.obj`${'greet'} darling ${'name'}, my age is ${'age'}. Great!`
// NOTE: Take a look that the placeholder names are wrapped in quotes!

const htmlSnippet = templateFn({
                                greet: 'Hello',
                                name: 'John',
                                age: 42
                            })
```

Use function `arr` when you will  number your placeholders and will provide data as an array. Example:
```js
const templateFn = literal.arr`${0} darling ${1}, my age is ${2}. Great!`
const htmlSnippet = templateFn(['Hello', 'John', 42])
```

Use function 'arg' when you will number your placeholders and will provide data as separate arguments. Example:
```js
const templateFn = literal.arg`${0} darling ${1}, my age is ${2}. Great!`
const htmlSnippet = templateFn ( 'Hello', 'John', 42 )

```





### Dynamic Placeholder Evaluation

In version 1.1.0 and onwards, the `obj`, `arr`, and `arg` functions support functions as arguments. Functions can dynamically evaluate application state or other data to produce a string result. Example:

```js
let loginState = false; // external state
function loginFn() {
    return loginState ? '' : 'You need to login first';
}

const fn = literal.obj`Change profile name. ${'login'}`;
let res = fn({ login: loginFn });
// res == 'Change profile name. You need to login first'

loginState = true;
res = fn({ login: loginFn }) // Use exactly the same request
// res == 'Change profile name.'
```



## Credits
'@peter.naydenov/literal-toolbox' was created and supported by Peter Naydenov.



## License
'@peter.naydenov/literal-toolbox' is released under the MIT License.
npm package: @peter3000/testing-npm
Description: Testing build and release of npm package.
Latest version: 1.0.2

# Testing npm

[![NPM release](https://img.shields.io/npm/v/@peter3000/testing-npm.svg?logo=npm&style=flat-square)](https://www.npmjs.com/package/@peter3000/testing-npm)
[![Publish workflow](https://img.shields.io/github/workflow/status/peterhirn/testing-npm/publish?label=publish&logo=github&style=flat-square)](https://github.com/peterhirn/testing-npm/actions?workflow=publish)

Release

    gh release create v1.0.0-alpha.1 --prerelease --generate-notes
    gh release create v1.0.0-rc.1 --prerelease --generate-notes
    gh release create v1.0.0 --generate-notes
npm package: @peter554/auma
Description: Augmented Audio Framework (AUMA).
Latest version: 0.0.3

# Augmented Audio Framework (AUMA)

AUMA is a framework for creating augmented audio applications. The framework currently supports the following application types (optimized for mobile devices):

- [**Survey**](https://auma-demos.surge.sh/survey/). A set of yes/no questions with user feedback at the end based on the survey score.

In general, an augmented audio application may be created by including a `<script/>` tag for the application type, and by then providing some minimal, application specific configuration. Scripts are available from the UNPKG CDN: https://unpkg.com/@peter554/auma/. This sounds a bit abstract, read on to understand more!

## Augmented audio application

You create an augmented audio application with just a simple HTML file:

```html
<!DOCTYPE html>
<html>
  <head>
    <!-- Include the AUMA script for this application type -->
    <script src="SCRIPT"></script>
  </head>
  <body>
    <!-- Configure & start the application -->
    <script>
      const appConfiguration = {
        // YOUR_APP_CONFIGURATION
      };
      auma(appConfiguration);
    </script>
  </body>
</html>
```

You only need to make a few small adaptions:

* Replace `SCRIPT` with a link to the AUMA script for your application type. 
  * Example: For the survey application type https://unpkg.com/@peter554/auma/dist/auma-survey.js. It is recommended to fix a specific version of the script in the URL e.g. for v1.2.3 of the survey use https://unpkg.com/@peter554/auma@1.2.3/dist/auma-survey.js.
* Complete `YOUR_APP_CONFIGURATION` to configure your specific application.

For script and configuration information read the application type specific documentation below.

## Survey

Script: 

https://unpkg.com/@peter554/auma/dist/auma-survey.js

Configuration:

```ts
type SurveyAppConfiguration = {
  id: string;
  welcome: {
    audioUrl: string;
  };
  questions: Array<{
    id: string;
    audioUrl: string;
  }>;
  // Result audio chosen based on survey score.
  // Choose audio where `from<=score<=to`.
  results: Array<{
    from: number;
    to: number;
    audioUrl: string;
  }>;
  // Optional tracking function, will be called on key events.
  trackFn?: (event: string, extraData: object) => void;
};
```

See `demo/survey/` (`npm run start-demo:survey`) for an example survey implementation.

## Development

Requirements:

- NodeJS https://nodejs.org/en/
- Basic understanding of VueJS development https://v3.vuejs.org/

```
# install the development dependencies
npm install

# run a demo e.g. survey
npm run start-demo:survey

# see package.json "scripts" section for more.
```

Releasing e.g. a patch

```
npm run build
npm version patch
npm publish
```
npm package: @peter554/cssutils
Description: CSS utility class generator. User friendly, simple, powerful.
Latest version: 0.15.0

# cssutils

![CI](https://github.com/Peter554/cssutils/workflows/CI/badge.svg)

`npm install --save-dev @peter554/cssutils`

A CSS utility class generator. User friendly, simple, powerful. Inspired by [tailwindcss](https://github.com/tailwindcss/tailwindcss) and [gordon](https://github.com/hankchizljaw/goron).

## Usage

- `cssutils --help` (CLI)
- `const cssutils = require("@peter554/cssutils")` (API)
- Check out the tests for the full features.

### CSS variables

- `cssutils variables --config ./config.yml`
- `cssutils.variables({configPath: "./config.yml"})`

```yml
variables:
  color:
    red: '#f00'
    green: '#0f0'
    grey:
      light: '#eee'
      mid: '#999'
```

```css
:root { --color-green: #0f0; }
:root { --color-grey-light: #eee; }
:root { --color-grey-mid: #999; }
:root { --color-red: #f00; }
```

### SASS/SCSS variables

- `cssutils sassvariables --config ./config.yml`
- `cssutils.sassVariables({configPath: "./config.yml"})`

```yml
variables:
  color:
    red: '#f00'
    green: '#0f0'
    grey:
      light: '#eee'
      mid: '#999'
```

```scss
$color-green: #0f0;
$color-grey-light: #eee;
$color-grey-mid: #999;
$color-red: #f00;
```

### Utility classes

- `cssutils utilities --config ./config.yml`
- `cssutils.utilities({configPath: "./config.yml"})`

```yml
variables:
  color:
    red: '#f00'
    green: '#0f0'
utilities:
  background-color:
    alias: bgclr
    from: color
  padding:
    alias: p
    from:
      0: 0
      1: 0.25rem
```

```css
.bgclr-green { background-color: #0f0; }
.bgclr-red { background-color: #f00; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
```

#### Responsive utility classes

```yml
utilities:
  background-color:
    alias: bgclr
    from:
      red: '#f00'
    breakpoints: [md, lg]
breakpoints:
  md: 800px
  lg: 1200px
  xl: 1600px
```

```css
.bgclr-red { background-color: #f00; }
@media (min-width: 800px) { .md\:bgclr-red { background-color: #f00; } }
@media (min-width: 1200px) { .lg\:bgclr-red { background-color: #f00; } }
```

#### Pseudo utility classes

```yml
utilities:
  background-color:
    alias: bgclr
    from:
      red: '#f00'
    pseudo: [hcs]
pseudo:
  hcs: [hover, focus]
  act: [active]
```

```css
.bgclr-red { background-color: #f00; }
.hcs\:bgclr-red:hover { background-color: #f00; }
.hcs\:bgclr-red:focus { background-color: #f00; }
```

#### Rotations

```yml
utilities:
  padding:
    alias: pad
    from:
      1: 0.25rem
    rotations: true
```

```css
.pad-1 { padding: 0.25rem; }
.pad-b-1 { padding-bottom: 0.25rem; }
.pad-l-1 { padding-left: 0.25rem; }
.pad-r-1 { padding-right: 0.25rem; }
.pad-t-1 { padding-top: 0.25rem; }
.pad-x-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.pad-y-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
```
npm package: @peter7z/redux-react-native-session
Description: Keep your session sync with the storage and redux
Author: Bernabe Gonzalez
Latest version: 1.0.7

# Redux React Native Session

[![NPM version](https://img.shields.io/npm/v/redux-react-native-session.svg?style=flat)](https://npmjs.org/package/redux-react-native-session)
[![Dependency Status](https://img.shields.io/david/bernabe9/redux-react-native-session.svg)](https://david-dm.org/bernabe9/redux-react-native-session)

Keep your session sync with AsyncStorage and Redux :key:

Redux React Native Session provides an simple API that allows to manage sessions through the app.

## Installation
yarn:

`yarn add redux-react-native-session`

npm:

`npm install redux-react-native-session --save`

## Usage

- Add the session reducer:
```javascript
import { combineReducers } from 'redux';
import { sessionReducer } from 'redux-react-native-session';

const reducers = {
  // ... your other reducers here ...
  session: sessionReducer
};
const reducer = combineReducers(reducers);
```
- Initiate the session service:
```javascript
import { createStore } from 'redux';
import { sessionService } from 'redux-react-native-session';

const store = createStore(reducer)

sessionService.initSessionService(store);
```

## API

### initSessionService(store)
Initialize an instance of the session service.

### refreshFromAsyncStorage
Force to refresh the Redux store from the AsyncStorage.

Note: this function is called once the session service is initialized

### saveSession(session:object) : Promise
Saves the session object in the AsyncStorage and changes the `authenticated` flag to `true` in Redux store

### loadSession : Promise(currentSession:Object)
Returns the current session if exists

Example:
```javascript
loadSession
.then(currentSession => console.log(currentSession))
.catch(err => console.log(err))
```

### deleteSession : Promise
Deletes the current session from the AsyncStorage

### saveUser(user:object) : Promise
Saves the user object in the AsyncStorage and in the Redux store

### loadUser : Promise
Returns the current user if exists

### deleteUser : Promise
Deletes the current user from the AsyncStorage and the Redux store

## Immutable JS
Usage of `redux-react-native-session` with an immutable store is really simple.
Instead of the `sessionReducer` import the `sessionImmutableReducer`, as the following example:

- Add the session reducer:
```javascript
import { combineReducers } from 'redux';
import { sessionImmutableReducer as session } from 'redux-react-native-session';

const reducers = {
  // ... your other reducers here ...
  session
};
const reducer = combineReducers(reducers);
```
npm package: @peter_curiousit/react-scripts
Description: Configuration and scripts for Create React App.
Latest version: 3.4.1

# react-scripts

This package includes scripts and configuration used by [Create React App](https://github.com/facebook/create-react-app).<br>
Please refer to its documentation:

- [Getting Started](https://facebook.github.io/create-react-app/docs/getting-started) – How to create a new app.
- [User Guide](https://facebook.github.io/create-react-app/) – How to develop apps bootstrapped with Create React App.
npm package: @peter_kachur_/industry-ui
Description: DryKISS React components library for NextJS
Author: The IndustryUI Authors
Latest version: 2.1.25

# DryKISS: IndustryUI

This is [DryKISS's](https://drykiss.com) react design system. It contains all of our components used
throughout our NextJS projects.

It enables us to rapidly prototype any type of site at any scale.

We are making this available to the wider community to experiment with at this time.

![](https://github.com/DryKISS/industryui.com/workflows/Lint%20IndustryUI/badge.svg)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Setup

```bash
$ npm install
$ npm start
```

This will start Storybook to play with the components

## Creators

DryKISS

> <https://drykiss.com> > <https://github.com/drykiss>

## Copyright and license

Code and documentation copyright 2013-2019 the
[IndustryUI Authors](https://github.com/DryKISS/industryui.com/graphs/contributors)
and [DryKISS, Ltd.](https://industryui.com)
Code released under the [MIT License](https://github.com/DryKISS/industryui.com/blob/master/LICENSE).
Docs released under [Creative Commons](https://creativecommons.org/licenses/by/3.0/).
npm package: @peter_xiter/dbh-js-tools
Description: js tools
Author: peter_xiter
Latest version: 1.1.0

### js 工具包

# 查看示例

npm version patch | major | minor

# 使用说明
```
import {dbhMd5,dbhCache,dbhTool} from '@peter_xiter/dbh-js-tools/index'
```
# License
MIT