open-index/open-npm huggingface dataset:
npm package: @sospedra/len
Description: Safely access arrays' length property
Author: sospedra
Latest version: 1.0.1

`len` 🍥
========

[![Build Status](https://travis-ci.org/sospedra/len.svg?branch=master)](https://travis-ci.org/sospedra/len)
[![David](https://img.shields.io/david/sospedra/len.svg)]()
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)


Safely access arrays' length property

### Install

```bash
yarn add @sospedra/len
```

*\* vendors/scope are a good idea, let's embrace it!*

### Usage

`len` will return the array target or `0` 👀

Meaning that **non-array targets always returns `0`**.

```js
import len from '@sospedra/len'

len([]) // 0
len([1, 2]) // 2
len(9) // 0
len('string') // 0
len(undefined) // 0
```

### Why?

Most of the errorceptions, bugsnags, sentry, etc. looks like:

> `Cannot read property 'length' of undefined`

And that makes me sad 🤷‍♀️

Also, by returning the length only of arrays **we ensure that it's iterable**.
Meaning that you can safely check for `.map`, `.reduce`, *et altri*

```js
if (!len(array)) array.map(myCallback)
```

Wonderful 😍
npm package: @sossohq/di
Description: A lightweight and fast dependency injection container for TypeScript and Node.js.
Latest version: 1.0.1

# Simple TypeScript Dependency Injection Container

A minimal dependency injection container for TypeScript with class and property decorators, supporting singleton lifecycle and circular dependency detection.

## Features

- Mark classes as injectable with `@Injectable()`
- Inject dependencies into class properties with `@Inject()`
- Singleton scope by default (one instance per class)
- Circular dependency detection with helpful error messages
- Supports injection across class inheritance chains
- Simple API, zero dependencies

---

## Installation

`npm install @sossohq/di`

---

## Usage

### Mark a class as injectable

```ts
import { Injectable } from '@sossohq/di';

@Injectable()
class Logger {
  log(message: string) {
    console.log('[LOG]', message);
  }
}
```

### Inject dependencies into properties

```ts
import { Inject } from '@sossohq/di';

@Injectable()
class Service {
  @Inject(Logger)
  logger!: Logger;

  doSomething() {
    this.logger.log('Service is doing something');
  }
}
```

### Resolve instances with the container

```ts
import { Container } from '@sossohq/di';

const service = Container.get(Service);
service.doSomething();
```

The same instance of Logger will be shared across all injections (singleton behavior).

---

## API

`@Injectable(): ClassDecorator`
Marks a class as injectable and registers it in the container.

`@Inject(dependency: Constructable): PropertyDecorator`
Injects the given dependency class instance into the decorated property.

`Container.get<T>(type: Constructable<T>): T`
Resolves an instance of the requested class, injecting dependencies recursively.

`Container.reset(): void`
Clears all cached singleton instances. Useful in testing scenarios.

---

## Circular Dependency Detection

If a circular dependency is detected during resolution, an error will be thrown with a message like:

`[DI] Cannot resolve dependency: type is undefined. Possible circular import or missing dependency.`

or maybe..

`[DI] Circular dependency detected while resolving Class`

---

## Notes & Limitations

1. Only supports property injection currently (no constructor injection)
2. Assumes injectable classes have a zero-argument constructor
3. Designed as a simple demonstration and lightweight container, not for large-scale use
npm package: @sosuisen/api-documenter
Description: Read JSON files from api-extractor, generate documentation pages
Latest version: 7.13.27

# @microsoft/api-documenter

This tool can be used to generate an online API reference manual for your TypeScript library.
It reads the *.api.json data files produced by [API Extractor](https://api-extractor.com/),
and then generates files in [Markdown](https://en.wikipedia.org/wiki/Markdown) or
[DocFX](https://dotnet.github.io/docfx/) format.

For usage information, see the
[Generating Docs](https://api-extractor.com/pages/setup/generating_docs/) article from the API Extractor
documentation.

## Links

- [CHANGELOG.md](
  https://github.com/microsoft/rushstack/blob/master/apps/api-documenter/CHANGELOG.md) - Find
  out what's new in the latest version
- [API Reference](https://rushstack.io/pages/api/api-documenter/)

API Documenter is part of the [Rush Stack](https://rushstack.io/) family of projects.
npm package: @sosuisen/prosemirror-schema-list
Description: List-related schema elements and commands for ProseMirror
Latest version: 1.1.13

# prosemirror-schema-list

**This is fork of https://github.com/ProseMirror/prosemirror-schema-list**

[ [**WEBSITE**](https://prosemirror.net) | [**ISSUES**](https://github.com/prosemirror/prosemirror/issues) | [**FORUM**](https://discuss.prosemirror.net) | [**GITTER**](https://gitter.im/ProseMirror/prosemirror) | [**CHANGELOG**](https://github.com/ProseMirror/prosemirror-schema-list/blob/master/CHANGELOG.md) ]

This is a [schema module](https://prosemirror.net/docs/ref/#schema-list) for [ProseMirror](https://prosemirror.net).
ProseMirror is a well-behaved rich semantic content editor based on
contentEditable, with support for collaborative editing and custom
document schemas.

This [module](https://prosemirror.net/docs/ref/#schema-list) exports
schema elements and commands for including lists in a ProseMirror
editor.

The [project page](https://prosemirror.net) has more information, a
number of [examples](https://prosemirror.net/examples/) and the
[documentation](https://prosemirror.net/docs/).

This code is released under an
[MIT license](https://github.com/prosemirror/prosemirror/tree/master/LICENSE).
There's a [forum](http://discuss.prosemirror.net) for general
discussion and support requests, and the
[Github bug tracker](https://github.com/prosemirror/prosemirror/issues)
is the place to report issues.

We aim to be an inclusive, welcoming community. To make that explicit,
we have a [code of
conduct](http://contributor-covenant.org/version/1/1/0/) that applies
to communication around the project.
npm package: @sosukesuzuki/rollup-plugin-bundle-size
Description: A simple rollup plugin to output bundle size.
Latest version: 0.1.0

# @sosukesuzuki/rollup-plugin-bundle-size

A simple rollup plugin to output bundle size.

## Install

```
npm install --save-dev @sosukesuzuki/rollup-plugin-bundle-size
```

## Usage

```js
import { bundleSize } from "@sosukesuzuki/rollup-plugin-bundle-size";

export default {
  input: "./index.js",
  output: {
    format: "cjs",
  },
  plugins: [bundleSize()],
};
```

## Release

```
npm run release -- --release=patch
```
npm package: @sosukesuzuki/suppress-stylelint
Description: Suppress stylelint warnings by directive comments
Author: Sosuke Suzuki
Latest version: 1.0.0

# `@sosukesuzuki/suppress-stylelint`

## Install

```
npm i -D @sosukesuzuki/suppress-stylelint
```

## Usage

```
npx @sosukesuzuki/suppress-stylelint src
```
npm package: @sosy/nx-docker-build-plugin
Description: This plugin is for generating Docker images for NX apps.
Latest version: 1.0.5

# @sosy/nx-docker-build-plugin

This plugin is for generating Docker images for NX apps.

## Usage

Add a new target with the builder `@sosy/nx-docker-build-plugin:build` to the applications in your `workspace.json`.

For the build the plugin will automatically provide following build args:
- **NX_PROJECT_NAME**: the name of the project 
- **NX_PROJECT_ROOT**: the root directory of the project 
- **NX_PROJECT_OUTPUT_PATH**: The output path of the build task of the project. This will only be defined if there is a build target for the project which has `options.outputPath` defined.

## Options

| option         | type      | default      | description  | 
|----------------|-----------|--------------|--------------|
| dockerContext  | string    | "."          | The directory for the context of the docker build. |
| dockerFile     | string    | "Dockerfile" | The dockerfile which should be used. |
| imageName      | string    | ""           | The name used for the docker image name. If empty, the projectName will be used. |
| imageSeparator | string    | "/"          | The separator which is used for creating the docker image name |
| imagePrefix    | string    | ""           | The prefix for the docker image name. |
| tag            | string    | latest       | The tag used for the docker image. |
| push           | boolean   | false        | If true, the created docker image will be pushed. |
| buildArgs      | string[]  | []           | Docker build arguments which will be used in the docker build. This arguments should be provided in the `workspace.json`. |
| envBuildArgs   | string[]  | []           | Docker build arguments which will be used in the docker build. This arguments should be provided with the command execution. This can be useful for providing extra arguments in the CI. |

The docker image which will be for the created, will be named
- `${imagePrefix}${separator}${imageName}:${imageTag}` if imagePrefix is not empty
- `${imageName}:${imageTag}` if imagePrefix is empty

## Example

Following configuration could be added to the `workspace.json` as `projects.app-example.architect.docker-build`

```json
"docker-build": {
  "builder": "@sosy/nx-docker-build-plugin:build",
  "options": {
    "dockerFile": "tools/docker/nest.Dockerfile",
    "buildArgs": [
      "PROJECT_NAME=account-service",
      "PROJECT_DIST=backend/account-service"
    ],
    "name": "backend-account-service"
  }
},
```