open-index/open-npm huggingface dataset:
npm package: @richardliucode/factorial
Description: A JavaScript function that can calculate factorial numbers
Author: Richard Liu
Latest version: 1.0.3

# FactorialJS

A JavaScript Library that can calculate factorial numbers

# Installation

**For Browser**

Add this script tag to your HTML code

```html
<script src="https://cdn.jsdelivr.net/npm/@richardliucode/factorial/browser.min.js"></script>
```

**For Node.js**

Install cmd

```bash
npm install @richardliucode/factorial
```

----

# Usage

For example, you want to calculate 10!.
 
**For Browser**

```JavaScript
let input = 10;
let result = getFactorial(input);
console.log(result); //3628800
```

**Node.js**

```javascript
const factorial = require("@richardliucode/factorial");
const input = 10
factorial.calc(input).then(function(result) {
    console.log(result); //3628800
});
```
npm package: @richardluoshi/first-vue-test-component
Description: A Vue 3.3+ component library with script setup syntax support
Author: richardluoshi
Latest version: 1.0.14

# @richardluoshi/first-vue-test-component

一个基于 Vue 3.3+ 的组件库，使用 `<script setup>` 语法糖开发。

## 环境要求

- Vue 3.3.0 或更高版本
- Node.js 14 或更高版本

> **注意**: 本组件库使用了 Vue 3.3+ 新增的 `defineOptions` 功能，因此要求 Vue 版本 >= 3.3.0。

## 安装

```bash
npm install @richardluoshi/first-vue-test-component
```

## 使用方法

### 全局注册

```javascript
import { createApp } from 'vue'
import MyVueComponent from '@richardluoshi/first-vue-test-component'
import App from './App.vue'

const app = createApp(App)
app.use(MyVueComponent)
app.mount('#app')
```

### 按需导入

```javascript
import { TextComp } from '@richardluoshi/first-vue-test-component'

export default {
  components: {
    TextComp
  }
}
```

### 在模板中使用

```vue
<template>
  <div>
    <!-- 使用组件 -->
    <TextComp :text="自定义文本" />
  </div>
</template>
```

## 组件

### TextComp

文本展示组件

#### Props

| 属性 | 类型 | 默认值 | 说明 |
|------|------|--------|------|
| text | String | "欢迎使用！" | 显示的文本内容 |

#### 示例

```vue
<template>
  <TextComp text="Hello World!" />
</template>
```

## 开发

```bash
# 安装依赖
npm install

# 开发模式
npm run dev

# 构建
npm run build
```

## 许可证

MIT
npm package: @richardme123/create-timetable-starter
Description: Start Code for Timetable App
Author: RichardMe123
Latest version: 1.0.7

# Timetable App Starter Code

### Requirements
- Node JS
- Python and Pip

### Usage
`npx @richardme123/create-timetable-starter .`

### Functions

- Installs frontend dependencies 
- Requires you to install backend dependencies
npm package: @richardnbanks/astro-loader-youtube
Description: This package provides a YouTube video loader for Astro. It allows you to load and parse YouTube video data, and use the data in your Astro site.
Author: Richard Banks
Latest version: 6.0.0

# Astro YouTube Video Loader

This package provides a YouTube video loader for the [Astro Loader API](https://docs.astro.build/en/reference/content-loader-reference/). It allows you to load and parse YouTube video data and use the data in your Astro site.

## Installation

```sh
npm install @richardnbanks/astro-loader-youtube
```

```sh
pnpm add @richardnbanks/astro-loader-youtube
```

## Usage

This package requires Astro 5 or later (You can enable experimental support for the content loader API in astro 4.10 or later).

Firstly add the content loader to your content configuration:

```typescript
// src/content.config.ts
import { defineCollection } from "astro:content";
import { youtubeLoader } from "@richardnbanks/astro-loader-youtube";

const youtube = defineCollection({
  loader: youtubeLoader({
    channelId: import.meta.env.YOUTUBE_CHANNEL_ID,
    apiKey: import.meta.env.YOUTUBE_API_KEY,
    maxResults: 1,
  }),
});

export const collections = { youtube };

```

Now just use it like any other content collection in astro:

```astro
---
import { getCollection, type CollectionEntry, render } from "astro:content";
import Layout from "../../layouts/Layout.astro";
const videos = await getCollection("youtube");
---

<Layout>
  {
    videos.map(async (video) => {
      return (
        <section>
            <a href={"https://youtube.com/watch?v=" + video.id} title={video.title}>
                <img src={video.data.thumbnails.default.url} alt={video.title} />
            </a>
        </section>
      );
    })
  }
</Layout>
```

## Options

The `youtubeLoader` function takes an options object with the following properties:

* channelId: The id of the channel you want to query videos from.
* apiKey: API Key for the [YouTube Data API](https://developers.google.com/youtube/v3/docs).
* maxResults (optional): The total number of videos you would like to fetch.

## Rendering videos with Astro Embed

You can use [Astro Embed](https://astro-embed.netlify.app/) to render YouTube videos for you.

```astro
---
import {getCollection} from "astro:content";
import {YouTube} from "astro-embed";

const videos = await getCollection("youtube");
---

{videos.map((video) => <YouTube id={video.id} />)}
```
npm package: @richardneililagan/cognito-integration-demo
Description: Sample snippets for integrating to Amazon Cognito.
Author: Richard Neil Ilagan
Latest version: 1.1.1

# cognito-integration-demo

A collection of functions that demonstrate how to communicate with [Amazon Cognito][1],
meant to be a proof-of-concept (POC) and/or a simple reference.

As part of the POC, this package includes a CLI client that consumes the functions above.
The package also comes with a manifest for the [Serverless Framework][3], so you can deploy the functions
as a set of HTTPS API endpoints behind an [Amazon API Gateway][6].

The demo snippets are largely adapted versions of the snippets provided by [`amazon-cognito-identity-js`][4],
which this codebase uses.

## About

The functions that demonstrate Cognito functionality are all stored in the `src/handlers/` folder.
Everything else is mostly just to build the CLI and/or Serverless Framework functionality around it.

If you're only interested in checking out how to talk to Cognito from your code,
then all you'll need are the files in `src/handlers/`. They're written in such a way so that
the logic in each handler is pretty much self-supporting, with not much dependencies between each other. (Ultimately, this means that the code can be made better in real use-case environments.)

---

## Installation

If you want to try out the CLI for yourself, you can just clone this repository and run `npm link` to make
the CLI tool available on your `PATH`, or you can install the release package directly from `npm`:

```
npm install -g @richardneililagan/cognito-integration-demo
```

You will need to prepare an Amazon Cognito User Pool yourself.

The package will look for the following environment variables:

- `APP_COGNITO_USERPOOL_ID` - The ID of an Amazon Cognito User Pool
- `APP_COGNITO_USERPOOL_CLIENT_ID` - The ID of a client authorized to talk with the User Pool above
- `APP_AWS_REGION` - The AWS region where your User Pool is.

- `APP_COGNITO_IDENTITYPOOL_ID` - (optional) The ID of an Amazon Cognito Identity Pool, configured to accept federation from the User Pool above. **Only required if you want to demo authentication against the AWS SDK**.

## Usage

The CLI is available through the `cognito` command if installed globally via `npm` or the codebase is made available
using `npm link`.

```
cognito
```

The available CLI options change depending on the CLI state.
(E.g. if you're logged in or not.)

Again, the actual logic is found in the `src/handlers/` directory.
I've done my best to make sure the functions are as autonomous as possible from each other,
so that the actual flow across each one is (hopefully) clearer.

## Deploying as a Serverless package

The codebase is also written so that it is deployable via the [Serverless Framework][3].
See the `serverless.yaml` file for more details on the routes.

## License

MIT

---

[@techlifemusic][5]

[1]: https://aws.amazon.com/cognito
[2]: https://aws.amazon.com/lambda
[3]: https://serverless.com
[4]: https://www.npmjs.com/package/amazon-cognito-identity-js
[5]: https://twitter.com/techlifemusic
[6]: https://aws.amazon.com/api-gateway
npm package: @richardneililagan/posthtml-external-link
Description: Add 'rel="external noopener nofollow"' and 'target="_blank"' to all external links [PostHTML Plugin]
Author: Sukka
Latest version: 0.1.1

# posthtml-external-link

<img align="right" width="220" height="200" title="PostHTML logo" src="http://posthtml.github.io/posthtml/logo.svg">

[![Version](https://img.shields.io/npm/v/posthtml-external-link.svg?style=flat-square)](https://www.npmjs.com/package/posthtml-external-link)
[![License](https://img.shields.io/npm/l/posthtml-external-link.svg?style=flat-square)](./LICENSE)
[![Build using TypeScript](https://img.shields.io/badge/definitions-TypeScript-blue.svg?style=flat-square)](https://www.typescriptlang.org/)

A [PostHTML](https://posthtml.org) plugin to add `rel="external noopener nofollow"` and `"target=_blank"` to all external links automatically, for privacy and SEO. [Read more](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).

## Installations

```bash
$ npm i -D posthtml-external-link
$ yarn add posthtml-external-link -D # If you prefer yarn
```

## Usage

Since `posthtml-external-link` is a [PostHTML](https://posthtml.org) plugin, just add `posthtml-external-link` to PostHTML plugins array.

```js
const posthtml = require('posthtml');
const { posthtmlExternalLink } = require('posthtml-external-link');

posthtml([
  // Other PostHTML plugins
  postHtmlExternalLink({
    // Here goes options
  }),
  // Other PostHTML plugins
]).process(source/* input html */)
  .then(result => console.log(result.html))
```

## Options

```js
postHtmlExternalLink({
  exclude: ['exclude1.com', 'exclude2.com'],
  noreferrer: false
}),
```

#### exclude (`string | string[]`)

Exclude hostname. Specify subdomain when applicable.

> `exclude1.com` does not apply to `www.exclude1.com` nor `en.exclude1.com`.

#### noreferrer (`boolean`)

Whether to add `noreferrer` to external links' `rel` attribute.

## Maintainer

**posthtml-external-link** © [Sukka](https://github.com/SukkaW), Released under the [MIT](./LICENSE) License.<br>
Authored and maintained by Sukka with help from contributors ([list](https://github.com/SukkaW/posthtml-external-link/contributors)).

> [Personal Website](https://skk.moe) · [Blog](https://blog.skk.moe) · GitHub [@SukkaW](https://github.com/SukkaW) · Telegram Channel [@SukkaChannel](https://t.me/SukkaChannel) · Twitter [@isukkaw](https://twitter.com/isukkaw) · Keybase [@sukka](https://keybase.io/sukka)