open-index/open-npm huggingface dataset:
npm package: @merkle-open/commitlint-conventional-changelog
Description: Shareable commitlint config enforcing conventional commits
Author: Merkle Inc.
Latest version: 1.0.11

# Shared commitlint config [![npm version](https://img.shields.io/npm/v/@merkle-open/commitlint-conventional-changelog.svg)](https://www.npmjs.org/package/@merkle-open/commitlint-conventional-changelog)

> Shareable `commitlint` config enforcing [conventional commits](https://conventionalcommits.org/).

## Usage

`npm install --save-dev husky @commitlint/cli @merkle-open/commitlint-conventional-changelog`

**package.json**

```json
  ...
  "husky": {
    "hooks": {
      "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
	},
	...
  },
  "commitlint": {
    "extends": [
      "@merkle-open/commitlint-conventional-changelog"
    ]
  },
  ...
```

## License

[MIT License](./LICENSE)
npm package: @merkle-open/cz-conventional-changelog
Description: Commitizen adapter following the conventional-changelog format.
Author: Merkle Inc.
Latest version: 1.1.3

# Shared commitizen conventional changelog config [![npm version](https://img.shields.io/npm/v/@merkle-open/cz-conventional-changelog.svg)](https://www.npmjs.org/package/@merkle-open/cz-conventional-changelog)

> reusable commitizen conventional changelog config

## Usage

`npm install --save-dev commitizen @merkle-open/cz-conventional-changelog`

**package.json**

```json
  ...
  "scripts": {
    "cz": "git-cz",
    ...
  },
  "config": {
    "commitizen": {
      "path": "@merkle-open/cz-conventional-changelog"
    }
  },
  ...
```

Part of the [commitizen](https://github.com/commitizen/cz-cli) family. Prompts for [conventional changelog](https://github.com/conventional-changelog/conventional-changelog) standard.

## License

[MIT License](./LICENSE)
npm package: @merkle-open/html-validate-config
Description: Shared html-validate config
Author: Merkle Inc.
Latest version: 2.0.1

# Shared html-validate config

> reusable [html-validate](https://gitlab.com/html-validate/html-validate) config

## Usage

`npm install --save-dev @merkle-open/html-validate-config html-validate@7`

**.htmlvalidate.js**

```js
module.exports = require('@merkle-open/html-validate-config');
```

More infos about: [rules](https://html-validate.org/rules/index.html)

**package.json**

```json
{
  "scripts": {
    "lint:html": "html-validate --ext html,htm dist/**/"
  }
}
```

More infos about: [OPTIONS](https://html-validate.org/usage/cli.html#options)

## License

[MIT License](./LICENSE)
npm package: @merkle-open/magnolia-headless-frontend-nextjs
Description: Magnolia headless frontend nextJs
Author: Merkle Inc.
Latest version: 0.0.6

# Magnolia NextJs Headless Frontend
- [Templates](./src/templates/_README.md)
- [Proxy/Middleware](./src/middleware/_README.md)
- [Config](./src/config/_README.md)
- [API](./src/api/_README.md)
- [Dynamic-Page](./README_dynamic-page.md)

## setup
- Add the following dependencies to your package.json
  - `@merkle-open/magnolia-headless-frontend-nextjs`
  - [`tsyringe`](https://github.com/Microsoft/tsyringe)
  - `reflect-metadata`
  - `next`
  - `react`
  - `react-dom`
- Configure tsconfig.json to include the following settings (`./tsconfig.json`)
  ```json
  {
    "compilerOptions": {
      "experimentalDecorators": true,
      "emitDecoratorMetadata": true
    },
    "include": [
      "node_modules/@merkle-open/magnolia-headless-frontend-nextjs"
    ]
  }
  ```
- Configure the [middleware composer](./src/middleware/_README.md#configure-middleware-composer)
- Implement and bind the interfaces specified [here](./src/config/_README.md) 
- Implement API endpoints specified [here](./src/api/_README.md)
- Configure [instrumentation.ts](https://nextjs.org/docs/app/guides/instrumentation#importing-files-with-side-effects) (`./instrumentation.ts`)
  ```typescript
  export async function register() {
      await import('reflect-metadata');
  }
  ```
- Setup [dynamic page](./README_dynamic-page.md)
- Setup Dependencies (`./Dependencies.ts`)
  ```typescript
  import 'reflect-metadata';
  import { container } from 'tsyringe';
  import { register as registerOss } from '@merkle-open/magnolia-headless-frontend-nextjs';
  import registerConfigs from './config/_Dependencies.ts';
  
  registerConfigs(container);
  registerOss(container);
  
  export { container };
  ```
- Setup next.config.ts (`./next.config.ts`)
  ```typescript
  import type { NextConfig } from 'next';
  import type { Rewrite } from 'next/dist/lib/load-custom-routes';
  
  const nextConfig: NextConfig = {
      transpilePackages: ['@merkle-open/magnolia-headless-frontend-nextjs'],
      async rewrites(): Promise<Rewrite[]> {
          return [
              {
                  source: '/robots.txt',
                  destination: '/api/robots.txt',
              },
              {
                  source: '/:language([a-z]{2})/sitemap/:type',
                  destination: '/api/:language/sitemap/:type',
              },
              {
                  source: '/:language([a-z]{2})/:path*',
                  destination: '/dynamic/:language/:path*',
              },
          ];
      },
      ...
  };
  export default nextConfig;
  ```
npm package: @merkle-open/prettier-config
Description: Shared prettier config
Author: Merkle Inc.
Latest version: 2.0.1

# Shared prettier config [![npm](https://img.shields.io/npm/v/@merkle-open/prettier-config.svg)](https://www.npmjs.com/package/@merkle-open/prettier-config)

> reusable prettier config

## Usage

`npm install --save-dev prettier @merkle-open/prettier-config`

**.prettierrc.js**

```js
module.exports = require('@merkle-open/prettier-config');
```

**.prettierignore**

```
# Node
**/node_modules
**/package.json
**/package-lock.json

# Generated
**/bower.json
**/lerna.json

# Build
**/build
**/dist
**/public
**/coverage
**/storybook-static

# Nitro
**/project/blueprints
**/.yo-rc.json
```

**package.json**

```json
  ...
  "scripts": {
    "prettier": "prettier --write \"**/*.*(gql|graphql|js|jsx|json|md|mdx|ts|tsx|yml|yaml)\"",
    ...
  },
  ...
```

## We recommend to use prettier together with lint-staged and husky

`npm install --save-dev husky lint-staged`

**package.json**

```json
  ...
  "lint-staged": {
    "*.{gql,graphql,js,jsx,json,md,mdx,ts,tsx,yml,yaml}": [
      "prettier --write"
    ]
  },
  "scripts": {
    "prettier": "prettier --write \"**/*.*(gql|graphql|js|jsx|json|md|mdx|ts|tsx|yml|yaml)\"",
    ...
  },
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  },
  ...
```

## License

[MIT License](./LICENSE)
npm package: @merkle-open/stylelint-config
Description: Shared stylelint config
Author: Merkle Inc.
Latest version: 5.0.1

# Shared stylelint config [![npm](https://img.shields.io/npm/v/@merkle-open/stylelint-config.svg)](https://www.npmjs.com/package/@merkle-open/stylelint-config)

> reusable stylelint config for stylelint 15

## Usage

`npm install --save-dev stylelint@15 @merkle-open/stylelint-config`

**stylelint.config.js**

```js
module.exports = require('@merkle-open/stylelint-config');
```

**.stylelintignore**

```
node_modules/
src/shared/base/reset/css/yui/reset.css
```

**package.json**

```json
{
  "scripts": {
    "lint:css": "stylelint src/**/*.*ss"
  }
}
```

## We recommend to use stylelint together with lint-staged and husky

`npm install --save-dev husky lint-staged`

**package.json**

```json
{
  "scripts": {
    "lint:css": "stylelint src/**/*.*ss"
  },
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  },
  "lint-staged": {
    "src/**/*.*ss": ["stylelint"]
  }
}
```

## License

[MIT License](./LICENSE)
npm package: @merkle-open/ts-config
Description: Shared configuration for Typescript
Author: Merkle Inc.
Latest version: 1.1.2

# Shared typescript config [![npm](https://img.shields.io/npm/v/@merkle-open/ts-config.svg)](https://www.npmjs.com/package/@merkle-open/ts-config)

> Shared configuration for Typescript

## Usage

`npm install --save-dev typescript @merkle-open/ts-config`

**tsconfig.json**

```json
{
  "extends": "@merkle-open/ts-config"
}
```

## License

[MIT License](./LICENSE)
npm package: @merklemanufactory/react-native-reanimated
Description: More powerful alternative to Animated library for React Native.
Author: Krzysztof Magiera
Latest version: 2.3.4

<img src="https://user-images.githubusercontent.com/16062886/117443145-ff868480-af37-11eb-8680-648bccf0d0ce.png" alt="React Native Reanimated by Software Mansion" width="100%">

### React Native's Animated library reimplemented

> Reanimated 2 is here! Check out our [documentation page](https://docs.swmansion.com/react-native-reanimated/) for more information

React Native Reanimated provides a more comprehensive,
low level abstraction for the Animated library API to be built
on top of and hence allow for much greater flexibility especially when it
comes to gesture based interactions.

## Installation

Check out [installation](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation) section of our docs for the detailed installation instructions.

## Documentation

Check out our dedicated documentation page for info about this library, API reference and more: [https://docs.swmansion.com/react-native-reanimated/docs/](https://docs.swmansion.com/react-native-reanimated/docs/)

## Examples

The source code for the example (showcase) app is under the [`Example/`](https://github.com/software-mansion/react-native-reanimated/blob/main/Example/) directory.
If you want to play with the API but don't feel like trying it on a real app, you can run the example project. Check Example/ directory README for installation instructions.

## License

Reanimated library is licensed under [The MIT License](LICENSE).

## Credits

This project has been build and is maintained thanks to the support from [Shopify](https://shopify.com), [Expo.io](https://expo.io) and [Software Mansion](https://swmansion.com)

[![shopify](https://avatars1.githubusercontent.com/u/8085?v=3&s=100 'Shopify.com')](https://shopify.com)
[![expo](https://avatars2.githubusercontent.com/u/12504344?v=3&s=100 'Expo.io')](https://expo.io)
[![swm](https://logo.swmansion.com/logo?color=white&variant=desktop&width=150&tag=react-native-reanimated-github 'Software Mansion')](https://swmansion.com)
npm package: @merkletrade/aptos-indexer-node-rs
Description: A tiny Aptos GRPC indexer native binding for Nodejs. The GRPC receive stream is handled in Rust for performance, resulting in up to 8x better throughput than using grpc-js (vanilla JS).
Latest version: 0.0.9

# @merkletrade/aptos-indexer-node-rs

A tiny Aptos GRPC indexer native binding for Nodejs. The GRPC receive stream is handled in Rust for performance, resulting in up to 8x better throughput than using grpc-js (vanilla JS).

It also provides basic transaction filtering and auto-reconnection on intermittent network failures.

### Basic Usage

```ts
import {
  startFetchTransactions,
  nextTransactions,
} from "@merkletrade/aptos-indexer-node-rs";

const ch = await startFetchTransactions(
  "https://grpc.mainnet.aptoslabs.com",
  "...", // authKey (optional)
  200_000_000n, // startVersion
  300_000_000n, // endVersion (optional)
  { focusContractAddresses: ["0xabc...def"] } // address to filter
);

while (true) {
  const resp = await nextTransactions(ch).then((v) => v && JSON.parse(v));
  if (!resp) return;

  // process txs
  console.log(resp.transactions);
}
```

### Usage with Node Stream

```ts
import { Readable } from "node:stream";
import {
  startFetchTransactions,
  nextTransactions,
} from "@merkletrade/aptos-indexer-node-rs";

const BUFFER_SIZE = 10;

const fetchTxs = async function* () {
  const ch = await startFetchTransactions(
    "https://grpc.mainnet.aptoslabs.com",
    "...", // authKey (optional)
    200_000_000n, // startVersion
    300_000_000n, // endVersion (optional)
    { focusContractAddresses: ["0xabc...def"] } // address to filter
  );

  while (true) {
    const resp = await nextTransactions(ch).then((v) => v && JSON.parse(v));
    if (!resp) return;
    yield resp;
  }
};

for await (const resp of Readable.from(fetchTxs(), { highWaterMark: BUFFER_SIZE })) {
  // process txs
  console.log(resp.transactions);
}
```
npm package: @merkletrade/aptos-indexer-node-rs-darwin-arm64
Description: This is the **aarch64-apple-darwin** binary for `@merkletrade/aptos-indexer-node-rs`
Latest version: 0.0.9

# `@merkletrade/aptos-indexer-node-rs-darwin-arm64`

This is the **aarch64-apple-darwin** binary for `@merkletrade/aptos-indexer-node-rs`
npm package: @merkletrade/aptos-indexer-node-rs-darwin-x64
Description: This is the **x86_64-apple-darwin** binary for `@merkletrade/aptos-indexer-node-rs`
Latest version: 0.0.9

# `@merkletrade/aptos-indexer-node-rs-darwin-x64`

This is the **x86_64-apple-darwin** binary for `@merkletrade/aptos-indexer-node-rs`
npm package: @merkletrade/aptos-indexer-node-rs-linux-arm64-gnu
Description: This is the **aarch64-unknown-linux-gnu** binary for `@merkletrade/aptos-indexer-node-rs`
Latest version: 0.0.9

# `@merkletrade/aptos-indexer-node-rs-linux-arm64-gnu`

This is the **aarch64-unknown-linux-gnu** binary for `@merkletrade/aptos-indexer-node-rs`
npm package: @merkletrade/aptos-indexer-node-rs-linux-arm64-musl
Description: This is the **aarch64-unknown-linux-musl** binary for `@merkletrade/aptos-indexer-node-rs`
Latest version: 0.0.9

# `@merkletrade/aptos-indexer-node-rs-linux-arm64-musl`

This is the **aarch64-unknown-linux-musl** binary for `@merkletrade/aptos-indexer-node-rs`
npm package: @merkletrade/aptos-indexer-node-rs-linux-x64-gnu
Description: This is the **x86_64-unknown-linux-gnu** binary for `@merkletrade/aptos-indexer-node-rs`
Latest version: 0.0.9

# `@merkletrade/aptos-indexer-node-rs-linux-x64-gnu`

This is the **x86_64-unknown-linux-gnu** binary for `@merkletrade/aptos-indexer-node-rs`
npm package: @merkletrade/aptos-indexer-node-rs-linux-x64-musl
Description: This is the **x86_64-unknown-linux-musl** binary for `@merkletrade/aptos-indexer-node-rs`
Latest version: 0.0.9

# `@merkletrade/aptos-indexer-node-rs-linux-x64-musl`

This is the **x86_64-unknown-linux-musl** binary for `@merkletrade/aptos-indexer-node-rs`
npm package: @merkletrade/create-rainbowkit
Description: Scaffold a new RainbowKit project
Latest version: 0.3.3

# 🌈🚀 create-rainbowkit

Scaffold a new RainbowKit project.

```bash
npm init @merkletrade/rainbowkit@latest
# or
pnpm create @merkletrade/rainbowkit@latest
# or
yarn create @merkletrade/rainbowkit
```

## License

Licensed under the MIT License, Copyright © 2022-present [Rainbow](https://rainbow.me).

See [LICENSE](./LICENSE) for more information.
npm package: @merkletrade/ts-sdk
Description: TypeScript SDK for the Merkle Trade
Latest version: 1.0.3

# Merkle Trade TypeScript SDK (Beta)

> **Note:** This SDK is in beta. We are actively refining its features, so there may be occasional changes or issues.

A TypeScript SDK for interacting with the Merkle Trade protocol on the Aptos blockchain. This SDK provides a simple interface for trading, managing positions while interacting with the Merkle Trade protocol.

**Join our Telegram Group:** [@merkle_trade_dev](https://t.me/merkle_trade_dev) for latest updates and Q&A.

## Features

- Transaction Payloads for trading
- Calculation utilities for trading
- Merkle APIs (positions, orders, etc.)
- Merkle Websocket APIs (price feeds, account updates)

## Installation

```bash
npm install @merkletrade/ts-sdk

// or

yarn add @merkletrade/ts-sdk

// or

pnpm add @merkletrade/ts-sdk
```

## Quick Start

```typescript
import { MerkleClient, MerkleClientConfig } from "@merkletrade/ts-sdk";
import { Aptos } from "@aptos-labs/ts-sdk";

// initialize clients

const merkle = new MerkleClient(await MerkleClientConfig.testnet());
const aptos = new Aptos(merkle.config.aptosConfig);

// initialize account (refer to Aptos docs)

const account = ...

// Place a market order

const order = await merkle.payloads.placeMarketOrder({
  pair: "BTC_USD",
  userAddress: account.accountAddress,
  sizeDelta: 300_000_000n, // 300 USDC
  collateralDelta: 5_000_000n, // 5 USDC
  isLong: true,
  isIncrease: true,
});

// submit transaction

const committedTransaction = await aptos.transaction.build
  .simple({ sender: account.accountAddress, data: payload })
  .then((transaction) =>
    aptos.signAndSubmitTransaction({ signer: account, transaction }),
  )
  .then(({ hash }) => aptos.waitForTransaction({ transactionHash: hash }));

console.log(committedTransaction);
console.log("Successfully placed order!");
```

## API Catalog

### Client Configuration

```typescript
const merkle = new MerkleClient(await MerkleClientConfig.mainnet());
const aptos = new Aptos(merkle.config.aptosConfig);
```

### Trading Payloads

- `placeMarketOrder`
- `placeLimitOrder`
- `cancelOrder`
- `updateTPSL`
- `testnetFaucet`

See [examples/place-order.ts](examples/place-order.ts) for basic usage.

### Merkle APIs

- `getSummary`
- `getPairInfo`
- `getAllPairInfos`
- `getPairState`
- `getAllPairStates`
- `getOrders`
- `getPositions`
- `getTradingHistory`
- `postFeepayer`

### Merkle Websocket APIs

Real-time price feeds and account updates (positions, orders) are available via websocket.

- `subscribePriceFeed`
- `subscribeAccountFeed`

See [examples/ws.ts](examples/ws.ts) for more details.

### Calculation Utilities

- `calcNewPrice`
- `calcPnlWithoutFee`
- `calcPriceImpact`
- `calcRolloverFee`
- `calcFundingRate`
- `calcAccFundingFeePerSize`
- `calcFundingFee`
- ...

See [src/calc/*](src/calc/) for more details.

### Aptos Helper Methods

- `getUsdcBalance`

## Environment
- [Mainnet](https://app.merkle.trade)
- [Testnet](https://app.testnet.merkle.trade)
npm package: @merl.ooo/api-types
Description: Type declarations for api.merl.ooo
Author: Christian Hotz
Latest version: 1.29.5

# @merl.ooo/api-types

**IMPORTANT NOTE**: The type definitions should always be up to date with
[int.api.merl.ooo](https://int.api.merl.ooo/docs).
This is the integration environment.
So releases might be stuck there for some days, before being deployed to production
[api.merl.ooo](https://api.merl.ooo/docs).
So you should test your frontend agains integration api in order to ensure consistency
with type definitions of this packages.
Then maybe wait until the new version is deployed to production.
Or for your production deployment pin the version number of this package.

**NOTE**: `RestResource` types the members `createdAt` and `updatedAt` as `Date`s.
But the REST api outputs Dates in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) `string`s.
So you have to convert those fields into `Date`s
before the parsed api response will match the `RestResource` inheriting Types.
This is also valid for all `Date` field specific to a resource.

## Installation

```
npm i -D @merl.ooo/api-types
```

## Usage

```javascript
// use meta types (RestResource, ...) helpers (Color, ...) and specific Resources (Room, Event, ...)
import type { RestResource, ResourceId, FindQuery, Color, Room, Event, Tag, v1 /*...*/ } from '@merl.ooo/api-types';

// use a specific api version
import type { Room, Event, Tag /*...*/ } from '@merl.ooo/api-types/v1';
// versions are also exported as named (v1, v2) and the current version, so
// if v1 is the latest version, v1.Room and current.Room are identical to Room imported above
import type { v1, current } from '@merl.ooo/api-types';
```

### enums

You can use fixed enums (eg. for event.kind or art event.essentials.status).
Don't import those as types
(and move it from `devDependencies` to regular `dependencies`, eg. leave out the `-D` when installing):

```javascript
import { EventKind, ArtEventStatus } from '@merl.ooo/api-types/v1';

console.log(EventKind.art, ArtEventStatus.requested); // art requested
```

## LICENSE

MIT
npm package: @merlean/analyzer
Description: AI-powered codebase analyzer - generates site maps for AI assistant integration
Author: zmaren
Latest version: 3.2.0

# @merlean/analyzer

AI-powered codebase analyzer that generates site maps for the Merlean AI assistant widget.

## Installation

```bash
npm install -g @merlean/analyzer
```

## Usage

```bash
# Analyze current directory
merleanalyze --name "My App"

# Analyze specific path
merleanalyze ./my-project --name "My App"

# Merge into existing site map
merleanalyze ./admin-panel --merge-with site_abc123
```

Or use with npx (no installation required):

```bash
npx @merlean/analyzer ./my-project --name "My App"
```

## Options

| Option | Description |
|--------|-------------|
| `--name, -n <name>` | Site name (required for new analysis) |
| `--merge-with, -m <siteId>` | Merge into existing site map |
| `--backend, -b <url>` | Custom backend URL |
| `--output, -o <file>` | Save site map locally |
| `--help, -h` | Show help |

## Supported Frameworks

- **JavaScript/TypeScript**: Express, Fastify, NestJS, React, Vue, Angular
- **PHP**: CodeIgniter, Laravel, Symfony
- **Python**: Flask, FastAPI, Django
- **Ruby**: Rails, Sinatra
- **Go**: Gin, Echo, Chi
- **Java/Kotlin**: Spring Boot

## How It Works

1. Scans your codebase for API patterns
2. Extracts route definitions and request schemas
3. Uploads to Merlean backend for AI analysis
4. Returns a site ID for widget integration

## Integration

After analysis, add the widget to your site:

```html
<script src="https://merlean-backend.fly.dev/bot.js" data-site-id="YOUR_SITE_ID"></script>
```

## Platform Support

Pre-compiled binaries are available for:
- macOS (Apple Silicon / ARM64)
- macOS (Intel / x64)
- Linux (x64)
- Windows (x64)

## Links

- [Documentation](https://github.com/zmaren/merlean#readme)
- [Report Issues](https://github.com/zmaren/merlean/issues)
npm package: @merlin-chatou/system-color-scheme
Description: System color scheme manager
Author: Merlin Chatou
Latest version: 1.0.3

# system-color-scheme

This npm package manage system (OS or browser) color scheme. 
Note this is not browser or user color scheme. This is **system** color scheme from operating system or browser settings. 


[![Animation showing the system color scheme detection](/images/system-color-scheme.gif)](https://www.youtube.com/watch?v=PnN5bA45lsU)


---

## Install


```bash
npm i @merlin-chatou/system-color-scheme
```


## Usage 

Import the package 

```js
import systemColorScheme from "@merlin-chatou/system-color-scheme";
```

### Get system color scheme

The `get()` function returns a string containing system color scheme `[ "light" | "dark" ] :

``` js
// Should display "light" or "dark"
console.log (systemColorScheme.get());
```



Alternatively, the `isDark()` function returns true if the system color scheme is dark, false otherwise. 

The following code log the system color scheme in the console


```js
if (systemColorScheme.isDark()) 
  console.log ('System color scheme is dark');
else
  console.log ('System color scheme is light');
```

---



### Detect system color scheme changes

The function `addEventListenerOnChange(callback)` runs the callback function when system color scheme changes. When the callback function is called, the parameter is true if the system color scheme changed to dark, false otherwise. 

``` js
systemColorScheme.addEventListenerOnChange((isDark) => {
  if (isDark) console.log("System color scheme changed for dark");
  else console.log("System color scheme changed for light");
})
```
npm package: @merlin-gql/core
Description: This repository is part of the **Merlin GQL Framework**
Author: silentium-labs
Latest version: 0.0.10

# Merlin GQL - Core Library

This repository is part of the **Merlin GQL Framework**

You can learn more about it in [Merlin GQL - CLI](https://github.com/silentium-labs/merlin-gql-cli)
npm package: @merlin4/helpers
Description: A suite of small helper functions for backend nodejs services.
Author: Paul Smith
Latest version: 1.0.0

# @merlin4/helpers

A suite of small helper functions for backend nodejs services.

Helper functions included:

- `sleep(ms)` - create a promise that resolves after `ms` milliseconds
- `arrayToIterator(arr)` - convert an array to an iterator
- `iteratorToArray(itr)` - convert an iterator to an array
- `chunkAsync(chunkSize, items)` - chunk and iterator/array into batches
- `chunkSync(chunkSize, items)` - chunk and iterator/array into batches
- `measureNow()` and `measureDur(end, start)` - measure the time between two points in time using [process.hrtime.bigint()](https://nodejs.org/docs/latest-v20.x/api/process.html#processhrtimebigint)
- `replaceAll()` - `String.replaceAll()` wrapper with partial support for older version of javascript
npm package: @merlin4/mongodb-connect
Description: Utility functions to simplify connecting to a MongoDB database.
Author: Paul Smith
Latest version: 0.0.2

# mongodb-connect
Utility functions to simplify connecting to a MongoDB database.

## Install

Install peer dependencies:

```bash
npm install config debug mongodb
```

Install this package:

```bash
npm install @merlin4/mongodb-connect
```

## Configuration

This package uses [config](https://www.npmjs.com/package/config) 
to load connection details. As such the following options are used:

* **db.url** - contains the connection string for the database
* **db.name** - contains the database name
* **db.debug** - specifies the [debug](https://www.npmjs.com/package/debug) channel that should be used

Shown below are some example config files.

**config/default.json**
```json
{
  "db": {
    "url": "mongodb://localhost:27017",
    "name": "test",
    "debug": "app:database"
  }
}
```

**config/custom-environment-variables.json**
```json
{
  "db": {
    "url": "DB_URL",
    "name": "DB_NAME",
    "debug": "DB_DEBUG"
  }
}
```

## Usage

Import the utility functions:

```js
const { connect, ping, newId } = require('@merlin4/mongodb-connect');
```

Test the connectivity:

```js
Promise.resolve(ping())
  .then(() => console.log('Connected to database.'))
  .catch((err) => console.error(err));
```

Find all documents in a collection:

```js
const db = await connect();
const products = await db.collection('products').find({}).toArray();
```

Generate a new ObjectId:

```js
const id = newId();
```

Parse an ObjectId from a string:

```js
const idString = '61608aa55318d3e1f8595804';
const id = newId(idString);
```
npm package: @merlin4/salesforce
Description: Provides a simple abstraction layer over the Salesforce REST APIs.
Author: Paul Smith
Latest version: 1.0.0

# @merlin4/salesforce

Provides a simple abstraction layer over the Salesforce REST APIs.

- `getAuthorization()` obtains a fresh access token
- `query()` performs SOQL queries against the Salesforce database
- `queryWithTimeout()` provides a simple wrapper to limit the runtime of queries
- `insert()` performs INSERT operations against the Salesforce database
- `update()` performs UPDATE operations against the Salesforce database
- `deleteRecords()` performs DELETE operations against the Salesforce database