open-index/open-npm huggingface dataset:
npm package: @fayeznazzal/tw
Description: Simple conditional TailwindCSS class utility with built in tailwind merge support, it's tiny, and fast!
Author: Fayez Nazzal
Latest version: 1.0.19

# tw

Simple conditional TailwindCSS class utility with built in tailwind merge support, it's tiny, and fast!

Powered by [scn](https://github.com/fayez-nazzal/scn) and [tailwind-merge](https://github.com/dcastil/tailwind-merge).

Write conditional class names more easily and without getting into trouble, plus, get your class names merged to the final class name passed, perfect for TailwindCSS users.

| If you don't use tailwind, just check [scn](https://github.com/fayez-nazzal/scn) as it's smaller (75 bytes).

## How to use?

### Code Style 1: Logical operators

- Use strings for normal class names.
- Add logical operators for conditional classes.

#### Example

```js
  import { tw } from "tw"

  tw('text-sm bg-white p-2', null, false && 'bg-black', undefined, 'p-3'); // 'text-sm bg-white p-3'
```

### Code Style 2: Tuples

- Use strings for normal class names.
- Use tuples for conditional styles, if the second value is falsy, the class name will not be included.

#### Examples

```js
  tw('text-sm b-white p-2', ['bg-black', false], ['p-3', true]); // 'text-sm bg-white p-3'
```

```js
  tw('one', undefined, 'two', false, null, ['three', false]); // 'one two'
```

## License

MIT ~ ofc!
npm package: @faykah/emails-en
Description: Emails data set in English.
Latest version: 0.1.1

# @faykah/emails-en

Emails data set in English.

## Summary

- [About](#about)
- [Features](#features)
- [Installation](#installation)
- [Examples](#examples)

## About

[Faykah](https://github.com/faykah/core) is a Node.js library that help create generators for various data.

This library contains a data set of English emails suited for mocking and testing emails.

## Features

- Provides a variables containing 114 emails for testing purposes
- Provides a browser version
- Provides its own Typescript types

## Installation

Using NPM:

```bash
npm install --save-dev @faykah/emails-en
```

Using Yarn:

```bash
yarn add --dev @faykah/emails-en
```

## Examples

- [1. Create an array generator](#1-create-an-array-generator)
- [2. Standalone usage](#2-standalone-usage)

### 1. Create an array generator

In this example, we will use [@faykah/core](https://github.com/faykah/core) to create an email generator, which will then let us generate random emails.

ES6

```ts
import { createArrayGenerator } from "@faykah/core";
import { emails } from "@faykah/emails-en";

const generateEmail = createArrayGenerator(emails);

generateEmail(); // "john.doe@example.com"
generateEmail(); // "foo@bar.com"
```

CJS

```js
const { createArrayGenerator } = require("@faykah/core");
const { emails } = require("@faykah/emails-en");

const generateEmail = createArrayGenerator(emails);

generateEmail(); // "john.doe@example.com"
generateEmail(); // "foo@bar.com"
```

Browser

```html
<body>
	<script type="text/javascript" src="https://unpkg.com/@faykah/core@0.1.0/lib/index.browser.min.js" defer></script>
	<script type="text/javascript" src="https://unpkg.com/@faykah/emails-en@0.1.0/lib/index.browser.min.js" defer></script>

	<script type="text/javascript" defer>
		const generateEmail = Faykah.createArrayGenerator(Faykah.emails);

		generateEmail(); // "john.doe@example.com"
		generateEmail(); // "foo@bar.com"
	</script>
</body>
```

### 2. Standalone usage

In this example, we will simply loop over the emails to understand you what it contains.

ES6

```ts
import { emails } from "@faykah/emails-en";

for (const email of emails) {
	console.log(email);
}
```

CJS

```js
const { emails } = require("@faykah/emails-en");

for (const email of emails) {
	console.log(email);
}
```

Browser

```html
<body>
	<script type="text/javascript" src="https://unpkg.com/@faykah/emails-en@0.1.0/lib/index.browser.min.js" defer></script>

	<script type="text/javascript" defer>
		for (const email of Faykah.emails) {
			console.log(email);
		}
	</script>
</body>
```
npm package: @fayona/identity
Description: ## Experiments
Latest version: 0.5.2

# TBD

## Experiments

## JWT Strategy

```typescript
import { ClaimsPrincipal } from '@fayona/core';
import {
  AuthenticationMiddleware,
  AuthenticationProblemDetailsException,
  AuthenticationProperties,
  AuthenticationScheme,
  FromStrategy,
  IAuthenticationHandler,
} from '@fayona/identity';
import { Fayona } from '@fayona/routing';
import * as express from 'express';
import { sign } from 'jsonwebtoken';
import { ExtractJwt, Strategy } from 'passport-jwt';
import {
  ProblemDetailsException,
  problemDetailsMiddleware,
} from 'rfc-7807-problem-details';
import { Injectable, ServiceLifetime } from 'tiny-injector';

import './app/Controllers/ExampleController';

console.log(
  sign({ foo: 'bar' }, 'shhhhh', {
    expiresIn: 10000,
  })
);

@Injectable({
  lifetime: ServiceLifetime.Transient,
})
class JwtBearerHandler extends IAuthenticationHandler {
  constructor(private _fromStrategy: FromStrategy<typeof Strategy>) {
    super();
  }
  public Authenticate(): Promise<ClaimsPrincipal> {
    return this._fromStrategy.Authenticate(
      Strategy,
      {
        jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(),
        secretOrKey: 'shhhhh',
      },
      (payload, done) => {
        done(
          new ProblemDetailsException({
            status: 401,
            title: 'Un',
          }),
          false
        );
        // done(null, new ClaimsPrincipal());
      }
    );
  }

  public Challenge(properties?: AuthenticationProperties): Promise<void> {
    throw new Error('Method not implemented.');
  }
  public Forbid(properties?: AuthenticationProperties): Promise<void> {
    throw new Error('Method not implemented.');
  }
}

const fayona = new Fayona();
const application = express();

fayona.GetRoutes().forEach((route) => {
  application.use(route.GetRouter());
});

application
  .use(express.json())
  .use(fayona.Init({ controllers: [] }))
  .use(
    AuthenticationMiddleware((options) => {
      options.DefaultAuthenticateScheme = 'Bearer'; // must be added
      options.AddScheme(
        new AuthenticationScheme(JwtBearerHandler, 'Bearer', 'JWT Bearer')
      );
      options.AddScheme(
        new AuthenticationScheme(
          JwtBearerHandler,
          'Firebase',
          'Firebase Authentication'
        )
      );
    })
  );

fayona.GetEndpoints().forEach((endpoint) => {
  application[endpoint.method](endpoint.FullPath, endpoint.FinalHandler);
});

application
  .use((req, res, next) => {
    next({
      statusCode: 404,
    });
  })
  .use(
    problemDetailsMiddleware((configure) => {
      configure.map(
        AuthenticationProblemDetailsException,
        () => true,
        (error) => {
          error.Details.type = 'recite';
          return error.Details;
        }
      );
    })
  );
const port = process.env.port || 3333;
const server = application.listen(port);
```

2. Use custom strategy (firebase)
3. Login with facebook
4. Login with twitter
5. Login with google
npm package: @fayona/openapi
Description: This library was generated with [Nx](https://nx.dev).
Latest version: 0.5.2

# openapi

This library was generated with [Nx](https://nx.dev).

## Building

Run `nx build openapi` to build the library.

## Running unit tests

Run `nx test openapi` to execute the unit tests via [Jest](https://jestjs.io).