open-index/open-npm huggingface dataset:
npm package: @martini97/healthcheck-middleware
Description: Middleware to check if the service dependencies are up
Latest version: 0.0.2

# healthcheck-middleware  
[![Build Status](https://travis-ci.org/martini97/healthcheck-middleware.svg?branch=master)](https://travis-ci.org/martini97/healthcheck-middleware)  
Simple module to check the health status of a service dependencies

## Usage

### Parameters
- `services`: an object mapping the service name to its URL, the service must have a /_ping route.

```js  
const express = require('express');
const healthcheck = require('@martini97/healthcheck-middleware').default;

const servicesAllUp = {
  'service-1': 'http://service-1',
  'service-2': 'http://service-2',
  'service-3': 'http://service-3',
  'service-4': 'http://service-4',
};

async function application() {
  const app = express();
  app.use(await healthcheck(servicesAllUp));
  return app;
};

async function start() {
  const app = await application();
  app.listen(3000, () => console.log('http://localhost:3000'));
}

start();
```
npm package: @martini97/redux-log-slow-reducers
Description: Warn about slow reducers in your Redux app.
Author: Alessandro F. Martini
Latest version: 0.0.5

[@martini79/redux-log-slow-reducers]()
===========================

[![license](https://img.shields.io/npm/l/redux-log-slow-reducers.svg?style=flat-square)](https://www.npmjs.com/package/redux-log-slow-reducers)
[![Build Status](https://travis-ci.org/martini97/redux-log-slow-reducers.svg?branch=master)](https://travis-ci.org/martini97/redux-log-slow-reducers)
[![Coverage Status](https://coveralls.io/repos/github/martini97/redux-log-slow-reducers/badge.svg?branch=master)](https://coveralls.io/github/martini97/redux-log-slow-reducers?branch=master)
[![Maintainability](https://api.codeclimate.com/v1/badges/03ddfad40ac1a8f39225/maintainability)](https://codeclimate.com/github/martini97/redux-log-slow-reducers/maintainability)

Warn about slow reducers in your [Redux](https://redux.js.org/) app.

Fork of [redux-log-slow-reducers](https://github.com/michaelcontento/redux-log-slow-reducers)

## Installation

```shell
npm install --save redux-log-slow-reducers
# or
yarn add @martini97/redux-log-slow-reducers
```

## Usage

```js

// Note: There is a optional second argument to logSlowReducers which allows you
//       to define how slow a reducer must be to trigger a warning (in ms) and
//       a predicate to decide whether or not to wrap the reducer functions. The
//       default value for threshold is 8ms, as this is half the time available
//       in one frame to run at 60fps. If you do not pass a predicate it will
//       always wrap the reducers.

import logSlowReducers from '@martini97/redux-log-slow-reducers';
import { createStore, combineReducers } from 'redux';

import * as reducers from './reducers';

const loggingReducers = logSlowReducers(
  reducers,
  { thresholdInMs: 10, predicate: () => process.env.NODE_ENV !== 'production' }
);
const store = createStore(combineReducers(loggingReducers));
```

## Contributing

This project uses [commitlint](https://commitlint.js.org/#/) to enforce commit
patterns, since it runs on CI there is no getting around that, so if you want to
avoid having your CI breaking, consider adding this to your `.git/hooks/commit-msg`:

```bash
ROOT=$(git rev-parse --show-toplevel)
NODE_BIN="$ROOT/node_modules/.bin"
COMMITLINT="$NODE_BIN/commitlint"

sed '/^# Please enter the commit message for your changes/,$d' $1 | $COMMITLINT
```
npm package: @martini991/axios-concurrency
Description: Gives easy control of how many requests an axios instance makes concurrently. Useful for dealing with rate limiting. Implemented using interceptors.
Author: Bernardo Wilberger
Latest version: 1.0.6

# Axios Concurrency Manager

> **Note:** This repository is a fork of [bernawil/axios-concurrency](https://github.com/bernawil/axios-concurrency).
> It may include modifications, updates, or maintenance improvements not present in the original version.

Get control of concurrent requests of any [axios](https://github.com/axios/axios) instance.
Implemented using axios interceptors.

## Installing

```shell
npm install @martini991/axios-concurrency
```

## Example

```js
import axios from 'axios'
import { ConcurrencyManager } from '@martini991/axios-concurrency'

const api = axios.create({
  baseURL: 'http://mypublicapi.com',
})

const MAX_CONCURRENT_REQUESTS = 5 // a concurrency parameter of 1 makes all api requests sequential
const manager = ConcurrencyManager(api, MAX_CONCURRENT_REQUESTS) // init concurrency manager

// requests will be sent in batches determined by MAX_CONCURRENT_REQUESTS
Promise.all(manyIds.map((id) => api.get(`/test/${id}`))).then((responses) => {
  // ...
})

manager.detach() // to stop using the concurrency manager ejecting the request and response handlers from your axios instance
```

## License

MIT
npm package: @martinjavierd/platzom
Description: Traductor de idioma platzom
Author: Martin Javier Del Percio
Latest version: 0.1.0

# Platzom

Platzom es un idioma inventado para el [Curso de Fundamentos de Javascript](https://platzi.com/js) de [Platzi](https://platzi.com). El mejor lugar de educación online.

## Descripción del idioma

- Si la palabra termina en "ar", se le quitan esos dos caracteres
- Si la palabra inicia con Z, se le añade "pe" al final
- Si la palabra traducida tiene 10 o más letras, se debe partir a la mitad y unir con un guión del medio
- Si la palabra original es un palíndromo, ninguna regla anterior cuenta y se devuelve la misma palabra intercalando mayúsculas y minúsculas  

## Instalación

```
npm install platzom
```

## Uso

```
import platzom from 'platzom'

platzom("Programar") // Program
console.log(platzom("Programar")) // Program
console.log(platzom("Zorro")) // Zorrope
console.log(platzom("Zarpar")) // Zarppe
console.log(platzom("abecedario")) // abece-dario
console.log(platzom("sometemos")) // SoMeTeMoS
```

## Créditos
- [Martín Javier Del Percio](https://twitter.com/@martinjavier)

## Licencia

[MIT](https://opensource.org/licenses/MIT)
npm package: @martinjohannesnilsen/editorjs-table
Description: Table for Editor.js
Latest version: 2.2.2

# Table tool

The Table Block for the [Editor.js](https://editorjs.io). Finally improved.

![](assets/68747470733a2f2f636170656c6c612e706963732f34313239346365632d613262332d343135372d383339392d6666656665643364386666642e6a7067.jpeg)

## Installation

Get the package

```shell
npm i --save @editorjs/table
```
or

```shell
yarn add @editorjs/table
```

## Usage

Add a new Tool to the `tools` property of the Editor.js initial config.

```javascript
import Table from '@editorjs/table';

var editor = EditorJS({
  tools: {
    table: Table,
  }
});
```

Or init the Table tool with additional settings

```javascript
var editor = EditorJS({
  tools: {
    table: {
      class: Table,
      inlineToolbar: true,
      config: {
        rows: 2,
        cols: 3,
      },
    },
  },
});
```

## Config Params

| Field              | Type     | Description          |
| ------------------ | -------- | ---------------------------------------- |
| `rows`             | `number` | initial number of rows. `2`  by default |
| `cols`             | `number` | initial number of columns. `2` by default |
| `withHeadings`             | `boolean` | toggle table headings. `false` by default |

## Output data

This Tool returns `data` in the following format

| Field          | Type         | Description           |
| -------------- | ------------ | ----------------------------------------- |
| `withHeadings` | `boolean`    | Uses the first line as headings |
| `content`      | `string[][]` | two-dimensional array with table contents |

```json
{
  "type" : "table",
  "data" : {
    "withHeadings": true,
    "content" : [ [ "Kine", "Pigs", "Chicken" ], [ "1 pcs", "3 pcs", "12 pcs" ], [ "100$", "200$", "150$" ] ]
  }
}
```

# Support maintenance 🎖

If you're using this tool and editor.js in your business, please consider supporting their maintenance and evolution.

[http://opencollective.com/editorjs](http://opencollective.com/editorjs)

# About CodeX

<img align="right" width="120" height="120" src="https://codex.so/public/app/img/codex-logo.svg" hspace="50">

CodeX is a team of digital specialists around the world interested in building high-quality open source products on a global market. We are [open](https://codex.so/join) for young people who want to constantly improve their skills and grow professionally with experiments in leading technologies.

| 🌐 | Join  👋  | Twitter | Instagram |
| -- | -- | -- | -- |
| [codex.so](https://codex.so) | [codex.so/join](https://codex.so/join) |[@codex_team](http://twitter.com/codex_team) | [@codex_team](http://instagram.com/codex_team) |
npm package: @martinjrobins/diffsol-js
Description: JavaScript/TypeScript bindings for diffsol ODE solver with WASM
Author: Martin Robinson
Latest version: 0.2.0

# @martinjrobins/diffsol-js

TypeScript/JavaScript bindings for the diffsol ODE solver with WebAssembly. See <https://github.com/martinjrobins/diffsol> for more details.

## API Documentation

<https://diffsol-js.fly.dev/docs>

## Installation

```bash
npm install @martinjrobins/diffsol-js
```

This package bundles the diffsol runtime WASM. It requires a hosted diffsol backend that exposes:

- `POST /compile`

The examples below use the public backend at `https://diffsol-js.fly.dev`.

## Usage

```ts
import {
  compile,
  MatrixType,
  LinearSolverType,
  OdeSolverType,
} from '@martinjrobins/diffsol-js';
```

```ts
const model = `
in_i { k = 1 }
u_i { y = 1 }
F_i { -k * y }
out_i { y }
`;

const ode = await compile(
  model,
  {
    backendUrl: 'https://diffsol-js.fly.dev',
  },
  MatrixType.FaerDense,
  LinearSolverType.Lu,
  OdeSolverType.Bdf
);

const params = new Float64Array([1.0]);
const y0 = ode.getY0(params);

const tEval = new Float64Array([0.0, 0.5, 1.0, 2.0]);
const solution = ode.solveDense(params, tEval);
const ys = solution.ys;

console.log('Initial conditions:', y0);
console.log('Solution:', ys);

solution.dispose();
ode.dispose();
```

## Interactive Solver UI

The package also ships the interactive solver stylesheet:

```ts
import '@martinjrobins/diffsol-js/interactive-solver.css';
```

If you are using the interactive UI components, your app must be able to bundle CSS and resolve the `plotly.js` dependency.

## CDN Usage

The build still produces `dist/diffsol.min.js` for CDN-style usage:

```html
<script src="https://diffsol-js.fly.dev/diffsol.min.js"></script>
```

In that mode the API is available at `window.diffsol`.

## Development

```bash
npm install
npm run test:offline
npm test
npm run build
npm run docs
```

## Publishing

From the `js/` directory:

```bash
npm publish
```

`prepublishOnly` runs the full test suite and rebuilds the package before publishing. Tests default to `https://diffsol-js.fly.dev` and can be overridden with `DIFFSOL_BACKEND_URL` if needed. Replace the placeholder repository metadata in `package.json` before the first real release from the new repo.
npm package: @martinlaxenaire/color-palette-generator
Description: A small, lightweight utility helper to generate color palettes based on a given input color.
Author: Martin Laxenaire
Latest version: 2.0.1

# Color palette generator

A small, lightweight utility helper to generate color palettes based on a given input color.

Uses the theory explained in this [video](https://www.youtube.com/watch?v=u5AnzLg1HxY), which is to generate a base palette as a set of colors around the given base color by shifting its hue increasingly, then creates additional lighter and darker palettes by manipulating the base palette colors saturation and brightness.

[Demo](https://martinlaxenaire.github.io/color-palette-generator/)

## Installation

#### npm

```
npm i @martinlaxenaire/color-palette-generator
```

#### yarn

```
yarn add @martinlaxenaire/color-palette-generator
```

Or use any other package manager.

## Example

### Creating colors

```javascript
import { ColorModel } from '@martinlaxenaire/color-palette-generator'

const redColor = new ColorModel('#ff0000')
const randomColor = new ColorModel()
const greenColor = new ColorModel('#29ab63')

const brighterGreenColor = greenColor.clone().saturateHsv(10).brighten(10)
```

### Creating palette generators

```javascript
import { ColorModel, ColorPaletteGenerator } from '@martinlaxenaire/color-palette-generator'

// create a palette generator from a random color
const palette = new ColorPaletteGenerator()

const greenColor = new ColorModel('#29ab63')

// create another palette generator from a green color
const paletteFromColor = new ColorPaletteGenerator({
  precision: 6,
  baseColor: greenColor, // we could also pass 'greenColor.hex' hexadecimal representation
})
```

### Getting random palettes

A random palette just picks colors randomly from the color palette generator.

```javascript
import { ColorModel, ColorPaletteGenerator } from '@martinlaxenaire/color-palette-generator'

const greenColor = new ColorModel('#29ab63')

// create a palette from a green color
const paletteFromColor = new ColorPaletteGenerator({
  precision: 6,
  baseColor: greenColor, // we could also pass 'greenColor.hex' hexadecimal representation
})

// get a random palette of 4 colors based on 'paletteFromColor'
const randomPaletteFromColor = paletteFromColor.getRandomPalette()
```

### Getting distributed palettes

A distributed palette picks colors based on their brightness/value.
It picks half its colors on a medium brightness range (between `37.5` and `87.5`), a quarter with low brightness (under `37.5`) and the last quarter with high brightness (over `87.5`).

```javascript
import { ColorPaletteGenerator } from '@martinlaxenaire/color-palette-generator'

// create a palette from a random color
const palette = new ColorPaletteGenerator()

// get a distributed palette of 6 colors based on 'palette'
const distributedPalette = palette.getDistributedPalette({
  length: 6,
})

// get a distributed palette based on 'palette', excluding colors too dark or too light
const anotherDistributedPalette = palette.getDistributedPalette({
  minBrightness: 10,
  maxBrightness: 90,
})
```
npm package: @martinlingstuyl/spfx-controls-react
Description: Reusable React controls for SharePoint Framework solutions
Latest version: 3.20.4

# SharePoint Framework React Controls

> This package is a fork of the @pnp/spfx-controls-react package, created to use certain features that were not yet released.

This is a open source library that shares a set of reusable React control that can be used in your SharePoint Framework solutions.

> If you are looking for web part property controls, please check following repository for those - [https://github.com/pnp/sp-dev-fx-property-controls](https://github.com/pnp/sp-dev-fx-property-controls)

## Get Started

More information to get started can be found documentation of this repository: [documentation](https://pnp.github.io/sp-dev-fx-controls-react/).

# Have issues or questions?

Please use following logic on submitting your questions or issues to right location to ensure that they are noticed and addressed as soon as possible.

* You have general question or challenge with SPFx - use [sp-dev-docs repository issue list](https://github.com/sharepoint/sp-dev-docs/issues).
* You have issue on specific controls in this package - use [issue list in this repository](https://github.com/pnp/sp-dev-fx-controls-react/issues).

## Contributing

We'd love your help! If you have ideas for new features or feedback, let us know by creating an issue in the [issues list](https://github.com/pnp/sp-dev-fx-controls-react/issues). Before you submit a PR with your improvements, please review our [project guides](https://pnp.github.io/sp-dev-fx-controls-react/guides).

This project welcomes contributions and suggestions.  Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.

## Code of Conduct

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

## "Sharing is Caring"

## Disclaimer

**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**
npm package: @martinnirtl/logging
Description: Preconfigured logging utility for microservices based on winston
Author: Martin Nirtl
Latest version: 1.0.2

# Logging Utility

Opinionated logging utility for unified logging in distributed systems based on winston.

- [Logging Utility](#logging-utility)
- [Install](#install)
- [Configuration](#configuration)
- [Usage](#usage)
  - [Logging Middlewares](#logging-middlewares)
    - [Express](#express)

# Install

Install via `npm`:

```
npm install --save @martinnirtl/logging
```

Or `yarn`:

```
yarn add @martinnirtl/logging
```

# Configuration

Programmatically configure library:

```javascript
import logger, { setDefaults } from '@martinnirtl/logging'

setDefaults({
  level: 'warn',
  metadata: { service: 'foo-service' },
  prettyPrint: process.env.NODE_ENV !== 'production',
})

logger.info('hello world') // will not be printed
```

Or use environment variables:

```env
# Specify log-level (default: info, options: [silly, debug, info, warn, error])
LOG_LEVEL=debug

# Add metadata tags with `LOG_METADATA_`-prefix, e.g. set { service: 'foo-service' }
LOG_METADATA_SERVICE=foo-service

# Pretty-print json-logs on truthy value (default: false)
LOG_PRETTY=true

# Silent logger on truthy value (default: false)
LOG_SILENT=0
```

# Usage

Singleton pattern:

```javascript
import logger, { setDefaults } from '@martinnirtl/logging'

setDefaults({
  level: 'debug',
  metadata: { 'process-id': process.pid },
})

logger.debug('just set the logger-defaults')

logger.info('starting application...', { date: new Date() })
```

Or dedicated loggers:

```javascript
import { getLogger, setDefaults } from '@martinnirtl/logging'

setDefaults({
  level: 'debug',
  metadata: { service: 'foo-service' },
})

const logger = getLogger({
  metadata: { context: 'initialization' },
})

logger.info('starting application...', { date: new Date() })
```

## Logging Middlewares

The lib also ships middlewares to optimally integrate into popular 3rd party frameworks.

At the moment, only the express framework is supported.

### Express

The express middleware allows to add a logger instance to every request-handler. Also it enables logging of incoming requests plus automatic request-`body|headers|query|params` to logging object's metadata mapping.

```javascript
const { getLogger, middleware, setDefaults } = require('@martinnirtl/logging')
const express = require('express')

setDefaults({
  level: 'debug', // default 'info'
})

const logger = getLogger({
  metadata: { context: 'init' },
})

const app = express()

app.use(middleware('express', {
  addToRequestObject: true, // default true
  logIncoming: {
    level: "debug", // default 'info'
    metadata: {
      body: true, // add body as a whole
      headers: ['host'], // add host field of headers to metadata
    }
  }
}))

app.all('/', (req, res) => {
  req.logger.debug('it works!')

  return res.status(200).send('Hello World')
})

app.listen(3000, () => logger.info(`app listening on port 3000`))

```
npm package: @martinomagnifico/icongenerator
Description: This package will generate an icon font from a directory of SVG files. There are some requirements for the SVG files before they can be processed:
Latest version: 1.0.2

# Icon generator

This package will generate an icon font from a directory of SVG files. There are some requirements for the SVG files before they can be processed:
 
Each filename should conform to:

    NUMBER_NAME(optional comma-delimited keywords).svg
    
The (decimal) number will be used to calculate the codepoint from the base codepoint that was chosen for the icon font.    


## Installation

    npm install icongenerator

## License

MIT

## Bugs

Yes, they are there
npm package: @martinoooo/dependency-injection
Description: 依赖注入 nodejs 实现
Latest version: 0.0.6

# @martinoooo/dependency-injection

依赖注入 nodejs 实现

## features

- property based injection
- constructor based injection
- singleton and transient services
- support for multiple DI containers

## 安装

```bash
yarn add @martinoooo/dependency-injection reflect-metadata
```

Import the `reflect-metadata` package at the **first line** of your application:

```ts
import 'reflect-metadata';

// Your other imports and initialization code
// comes here after you imported the reflect-metadata package!
```

As a last step, you need to enable emitting decorator metadata in your Typescript config. Add these two lines to your `tsconfig.json` file under the `compilerOptions` key:

```json
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
```

## 接入指南

```typescript
import { Container, Inject, Service } from '@martinoooo/dependency-injection';

// 通过装饰器自动注册
@Service()
class Duck {
  bark() {
    return 'barking';
  }
}

class Con {
  // 通过装饰器进行注入
  // 可以通过constructor自动注入
  @Inject()
  duck: Duck;

  public getDuck() {
    return this.duck.bark();
  }
}

// 手动注册
Container.registry(Con);
// 获取注册过的实例
let duck = Container.get<Con>(Con);
duck.getDuck();
```
npm package: @martinpang/nestjs-config
Description: nestjs easy config via node-config
Author: Martin Pang
Latest version: 1.2.3

<p align="center">
  <a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="200" alt="Nest Logo" /></a>
</p>

## @martinpang/nestjs-config

Configure your Nest.js Applications with node-config lib,without configuration,just import and use,so easy and convenient.

This module is build on [node-config](https://www.npmjs.com/package/config),support nestjs DI system,very easy to use and same to config lib.

## How to use

```
npm i @martinpang/nestjs-config
//or you can use yarn or pnpm
pnpm add @martinpang/nestjs-config
```

the config dir is default to node-config ,the workspace rootdir/config,and many times  same to ${workspace}/config

The config file type is same to node-config lib,json,json5,yaml,yml,xml ,cson,ts and so on ,details:https://www.npmjs.com/package/config

```
//This is app.module.ts,and config path dirs in rootdir
//In this case,the config dirs are rootdir/config2,rootdir/config,rootdir/config3
//The config file name is same to config lib,such as default.EXT,development.EXT ...
//Note:path is based on rootdir,'./' means rootdir,config dir will join with rootdir
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { ConfigModule } from "@martinpang/nestjs-config"; //here

@Module({
  imports: [ConfigModule.forRoot({ path: ['config2', 'config', 'config3'] })],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}

```

If you use default config dir,you can also...

```
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { ConfigModule } from "@martinpang/nestjs-config"; //here

@Module({
  imports: [ConfigModule],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}
```

So easy to use in providers:

```
//This is app.service.ts
import { Injectable } from '@nestjs/common';
import { ConfigService } from "@martinpang/nestjs-config"; //here

@Injectable()
export class AppService {
  //Inject via contructor,and use anywhere
  constructor(private configService: ConfigService) {}
  
  getHello(): string {
    console.log(this.configService.get('Your config vars key'));
    return 'Hello World!';
  }
}
```

To use different env config file

```
//start your nestjs app in package.json script,config will merge NODE_ENV.EXT and default.EXT
"start:dev": "cross-env NODE_ENV=development nest start --watch",
"start:prod":"cross-env NODE_ENV=production nest start",
//PS.You need cross-env lib or manually set NODE_ENV on your system.
```

The ConfigMoudle can be used in global scope.You just need import once and use anywhere.

## License

Nest is [MIT licensed](LICENSE).