open-index/open-npm huggingface dataset:
npm package: @ingest/ingest-js-sdk
Description: Javascript SDK for communicating with Ingest's REST API.
Author: Ingest
Latest version: 2.3.1

# Ingest.IO Javascript SDK

[![Build Status](https://travis-ci.org/ingest/ingest-js-sdk.svg?branch=master)](https://travis-ci.org/ingest/ingest-js-sdk) [![Greenkeeper badge](https://badges.greenkeeper.io/ingest/ingest-js-sdk.svg)](https://greenkeeper.io/)

The official Ingest.IO Javascript SDK for interfacing with Ingest.

Getting Started
-------------

Getting started with the Ingest SDK is simple.

The Ingest JS SDK is fully promise based and uses [pinkyswear](https://github.com/timjansen/PinkySwear.js) to handle the promises, removing the need for any polyfills.

There are 2 main ways to utilize it.

### Via NPM

1. Install the SDK via npm:

```sh
npm install @ingest/ingest-js-sdk
```

2. Require it in your project:
```javascript
  var IngestSDK = require('@ingest/ingest-js-sdk');
```

3. Initialize the SDK:
```javascript
  var Ingest = new IngestSDK({
    token: 'Bearer ...'
  });
```

4. Start making calls:
```javascript
  Ingest.videos.getAll()
    .then(function (response) {
      // Handle Response
    });
```

### Via Script

1. Clone the repo
2. Put the `ingest-sdk.js` in a hosted location
3. Include the script tag in your HTML

```html
  <script src="/path/to/hosted/files/ingest-sdk.js"></script>
```

4. Initialize the SDK:

```javascript
  var Ingest = new IngestSDK({
    token: 'Bearer ...'
  });
```

5. Start making calls:
```javascript
  Ingest.videos.getAll()
    .then(function (response) {
      // Handle Response
    });
```

Uploading a file
---------------

Uploading a file is slightly different then using the other resources. To upload a file and start the upload, grab your file and use the `Ingest.upload` functionality:

```javascript
  upload = Ingest.upload(file);
  upload.save();
```

The `Ingest.upload` function returns an upload object, with the following functions available:

Method | Endpoint
-------|---------
abort | `Allows you to abort the upload.`
abortSync | `Allows you to abort the upload synchronously. Takes a callback function to invoke when complete.`
pause | `Pauses the upload.`
progress | `Takes a callback function that is invoked anytime progress on the upload occurs.`
resume | `Resumes a paused upload.`
save | `Starts the upload.`


API Documentation
---------------

For more information on the available functionality of the sdk, please see the [API Docs](https://docs.ingest.io/?javascript#).

Issues
-----

If you encounter any issues using the Ingest JS SDK, please search the existing [issues](https://github.com/ingest/ingest-js-sdk/issues) first before opening a new one.

Please include any information that may be of assistance with reproducing the issue.

Development
---------
To modify the source of the Ingest SDK, clone the repo.

```
npm install
```

Develop in a topic/feature branch, not master.

Running Tests
------------

To run the unit tests, use:

```sh
npm run test
```

To watch the unit tests, use:

```sh
npm run test:watch
```

License
------

This SDK is distributed under the MIT License, see [License](LICENSE) for more information.
npm package: @ingestkorea/util-error-handler
Description: INGESTKOREA Utility Error Handler for Node.js.
Author: ingestkorea
Latest version: 1.0.3

# @ingestkorea/util-error-handler

[![npm (scoped)](https://img.shields.io/npm/v/@ingestkorea/util-error-handler?style=flat-square)](https://www.npmjs.com/package/@ingestkorea/util-error-handler)
[![NPM downloads](https://img.shields.io/npm/dm/@ingestkorea/util-error-handler?style=flat-square)](https://www.npmjs.com/package/@ingestkorea/util-error-handler)

## Description
INGESTKOREA Utility Error Handler for Node.js.

## Installing
```sh
npm install @ingestkorea/util-error-handler
```

## Getting Started

### Pre-requisites
+ Use TypeScript v4.x

### Import
```ts
// ES5 example
const { IngestkoreaError } = require('@ingestkorea/util-error-handler');
```

```ts
// ES6+ example
import { IngestkoreaError } from '@ingestkorea/util-error-handler';
```

### Usage

#### Create custom error instance.
```ts
let customError = new IngestkoreaError({
  code: 500, type: 'Internal Server Error',
  message: 'Something Broken', description: 'Unhandled Error'
});
```

#### Async/await (sample api response)
```ts
const sampleAPIResponseFunction = async (input: boolean) => {
  try {
    if (!input) throw new IngestkoreaError({
      code: 401, type: 'Unauthorized',
      message: 'Invalid Credentials', description: 'Access Token Expired'
    });

    const contents = { message: 'Verfiy Token Success' };
    return {
      statusCode: 200,
      headers: { 'content-type': 'application/json; charset=utf-8' },
      body: JSON.stringify(contents, null, 2)
    };
  } catch (err) {
    let customError = new IngestkoreaError({
      code: 500, type: 'Internal Server Error',
      message: 'Something Broken', description: 'Unhandled Error'
    });

    if (err instanceof Error) customError.error.description = `${err.name}: ${err.message}`;
    if (err instanceof IngestkoreaError) customError = err;

    const contents = { ...customError };
    return {
      statusCode: contents.error.code,
      headers: { 'content-type': 'application/json; charset=utf-8' },
      body: JSON.stringify(contents, null, 2)
    };
  };
};

(async () => {
  const response = await sampleAPIResponseFunction(false); // (true | false)
  console.log(response)
})();
```

## License
This Utility is distributed under the [MIT License](https://opensource.org/licenses/MIT), see LICENSE for more information.
npm package: @ingestkorea/util-jsonwebtoken
Description: INGESTKOREA Utility JsonWebToken Handler for Node.js.
Author: ingestkorea
Latest version: 1.1.1

# @ingestkorea/util-jsonwebtoken

[![npm (scoped)](https://img.shields.io/npm/v/@ingestkorea/util-jsonwebtoken?style=flat-square)](https://www.npmjs.com/package/@ingestkorea/util-jsonwebtoken)
[![NPM downloads](https://img.shields.io/npm/dm/@ingestkorea/util-jsonwebtoken?style=flat-square)](https://www.npmjs.com/package/@ingestkorea/util-jsonwebtoken)

## Description
INGESTKOREA Utility JsonWebToken Handler for Node.js.

## Installing
```sh
npm install @ingestkorea/util-jsonwebtoken
```

## Getting Started

### Pre-requisites
+ Use TypeScript v4.x
+ Includes the TypeScript definitions for node.
  ```sh
  npm install -D @types/node # save dev mode
  ```

### Support Algorithms

+ ES256 (ECDSA using P-256 curve and SHA-256 hash algorithm)

### Create KeyPair

```js
import { writeFileSync } from 'node:fs';
import { createJsonWebKeyEC256 } from '@ingestkorea/util-jsonwebtoken';
(async () => {
  const dist = __dirname + '/' + 'keyInfo.json';
  const keyInfo = await createJsonWebKeyEC256();
  writeFileSync(dist, JSON.stringify(keyInfo, null, 2), 'utf-8');
  console.log({ dist, keyInfo });
  // {
  //   dist: DIST_FILE_PATH,
  //   keyInfo: KEY_INFO
  // }
})();
```

### Import

```ts
import {
  JsonWebTokenClient,
  CreateTokenHandlerInput,
  VerifyTokenHandlerInput
} from '@ingestkorea/util-jsonwebtoken';
import { publicKey, privateKey } from './keyInfo.json';
```

### Usage

#### CreateToken
+ Initiate client with configuration.(`sign`, `privateKey`)

```ts
// a client can be shared by different CreateTokenHandlerInput params.
const client = new JsonWebTokenClient({
  mode: 'sign',
  credentials: {
    privateKey: privateKey
  },
  options: { // optional
    issuer: 'hello-world.com', // default your hostname
    expiresIn: 3600 * 3, // default 3600
    serviceName: 'sample-servie' // default "USER_NAME token service"
  }
});

(async () => {
  try {
    let params: CreateTokenHandlerInput = {
      userName: 'John Doe', // sample
      isAdmin: true // sample
    };
    let data = await client.create(params);
    console.log(data)
} catch (err) {
    console.log(err);
  };
})();
```

#### VerifyToken
+ Initiate client with configuration.(`verify`, `publicKey`)

```ts
// a client can be shared by different VerifyTokenHandlerInput params.
let client = new JsonWebTokenClient({
  mode: 'verify',
  credentials: {
    publicKey: publicKey
  }
});

(async () => {
  let inputToken = 'xxx.yyy.zzz';
  let params: VerifyTokenHandlerInput = {
    token: inputToken
  };
  try {
    let data = await client.verify(params);
    console.log(data)
  } catch (err) {
    console.log(err);
  };
})();
```

## License
This Utility is distributed under the [MIT License](https://opensource.org/licenses/MIT), see LICENSE for more information.
npm package: @ingestkorea/util-lambda-logger
Description: INGESTKOREA Utility Lambda Log Handler for Node.js.
Author: ingestkorea
Latest version: 1.0.0

# @ingestkorea/util-lambda-logger

[![npm (scoped)](https://img.shields.io/npm/v/@ingestkorea/util-lambda-logger?style=flat-square)](https://www.npmjs.com/package/@ingestkorea/util-lambda-logger)
[![NPM downloads](https://img.shields.io/npm/dm/@ingestkorea/util-lambda-logger?style=flat-square)](https://www.npmjs.com/package/@ingestkorea/util-lambda-logger)

## Description

INGESTKOREA Utility Lambda Log Handler for Node.js.

## Installing

```sh
npm install @ingestkorea/util-lambda-logger
```

## Getting Started

### Pre-requisites

- Use TypeScript v5.x
  ```sh
  npm install -D typescript # save dev mode
  ```

### Import

```ts
// ES5 example
const { lambdaLogger } = require("@ingestkorea/util-lambda-logger");
```

```ts
// ES6+ example
import { lambdaLogger } from "@ingestkorea/util-lambda-logger";
```

### Usage

Async/await

```ts
// Set Label, Message
import { lambdaLogger, LambdaLoggerInput } from "@ingestkorea/util-lambda-logger";

(async () => {
  let params: LambdaLoggerInput = {
    label: "INFO", // optional "INFO" | "ERROR"
    message: "hello world", // required Object | String
  };
  await lambdaLogger(params);
})();
```

## License

This Utility is distributed under the [MIT License](https://opensource.org/licenses/MIT), see LICENSE for more information.
npm package: @ingestkorea/util-simple-logger
Description: INGESTKOREA Utility Simple Log Handler for Node.js.
Author: ingestkorea
Latest version: 1.0.3

# @ingestkorea/util-simple-logger

[![npm (scoped)](https://img.shields.io/npm/v/@ingestkorea/util-simple-logger?style=flat-square)](https://www.npmjs.com/package/@ingestkorea/util-simple-logger)
[![NPM downloads](https://img.shields.io/npm/dm/@ingestkorea/util-simple-logger?style=flat-square)](https://www.npmjs.com/package/@ingestkorea/util-simple-logger)

## Description
INGESTKOREA Utility Simple Log Handler for Node.js.

## Installing
```sh
npm install @ingestkorea/util-simple-logger
```

## Getting Started

### Pre-requisites
+ Use TypeScript v4.x

### Import
```ts
// ES5 example
const { simpleLoggerClient } = require('@ingestkorea/util-simple-logger');
```

```ts
// ES6+ example
import { simpleLoggerClient } from '@ingestkorea/util-simple-logger';
```
### Usage

Set Title, Message

```ts
const title = 'Sample Title';
const message = JSON.stringify({
    requestId: "27af36a4af4254bd0106a0e1c49bc513",
    statusCode: 202,
    statusName: "success",
}, null, 2);
```

Async/await
```ts
(async () => {
    const params = {
        title: title, // required
        message: message, // required
        mode: 'KST' // optional
    };
    await simpleLoggerClient.resolve(params);
})();
```

## License
This Utility is distributed under the [MIT License](https://opensource.org/licenses/MIT), see LICENSE for more information.
npm package: @ingeze/txtspy
Description: A CLI tool for text search
Author: Ezequiel Saucedo
Latest version: 1.1.7

# txtspy

<p>
  <a href="https://github.com/ingEze/txtspy/actions/workflows/node.js.yml">
    <img src="https://github.com/ingEze/txtspy/workflows/Node.js%20CI/badge.svg" alt="Node.js CI" style="vertical-align: middle; margin-right: 10px;" />
  </a>
  <a href="https://deepwiki.com/ingEze/txtspy">
    <img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki" style="vertical-align: middle;" />
  </a>
</p>

# Notice

This package has been moved to [`@ingeze/txtspy`](https://www.npmjs.com/package/@ingeze/txtspy).

Please update your dependencies:

# Documentation / Documentación

[<img src="https://upload.wikimedia.org/wikipedia/commons/a/a4/Flag_of_the_United_States.svg" width="40">](docs/en/README.md)

[<img src="https://upload.wikimedia.org/wikipedia/commons/9/9a/Flag_of_Spain.svg" width="40">](docs/es/README.md)

**txtspy** is a command-line tool designed to analyze and process text files efficiently. With multiple commands for searching, analyzing, and managing files and directories, it offers a comprehensive solution for developers and text analysts.

## Features

- **Text File Analysis**: Process text files for statistics and insights
- **Word Search**: Find words or phrases across single or multiple files
- **Directory Management**: Scan directory structures and open files or folders
- **Code Analysis**: Extract and validate comments from programming files
- **Multilingual Support**: Full support for English and Spanish interfaces

## Installation

```bash
npm install -g @ingeze/txtspy
```

After installation, you can use txtspy from anywhere in your terminal:

```bash
txtspy <command> [options]
```

## Quick Start

```bash
# Search for a word in a file
txtspy search "function" myfile.js

# Get statistics for a text file
txtspy stats document.txt

# Scan a directory structure
txtspy scan ./src

# Open a file or directory
txtspy open ./myfile.js
```

## Development Status

txtspy is under active development. Current development priorities include:
- Exporting analysis as text files
- Web page URL analysis
- Processing large files with stream support

## Changelog

For detailed information about each release, see the [Changelog](./CHANGELOG.md).

For complete documentation on all available commands and options, please refer to the documentation in the `/docs` folder for your preferred language.