open-index/open-npm huggingface dataset:
npm package: @szum.szym/upside-down
Description: It flips a text upside-down.
Author: Szymon Szumski
Latest version: 1.0.4

# upside-down
It flips a text uʍop ǝpᴉsdn.

## Installation

```
npm install @szum.szym/upside-down
```


## Usage
```
var upsideDown = require('@szum.szym/upside-down');

upsideDown('https://github.com/szumszym/upside-down');   // uʍopǝpᴉsdn\ɯʎzsɯnzs\ɯoɔ˙qnɥʇᴉɓ\\:sdʇʇɥ
upsideDown('uʍopǝpᴉsdn\\ɯʎzsɯnzs\\ɯoɔ˙qnɥʇᴉɓ\\\\:sdʇʇɥ');   // https://github.com/szumszym/upside-down
```
npm package: @szydlovski/color-parse
Description: parse css color strings
Author: Kamil Szydlowski
Latest version: 0.1.4

# color-parse

Parse CSS color strings, with added support for other color models not included in the CSS specification.

# Usage

```
npm install @colorsuite/color-parse
```
```javascript
import { parseColor } from '@szydlovski/color-parse';

parseColor('#fabfab66') // [ [ 250, 191, 171, 0.4 ], 'rgb' ]
parseColor('hsl(270,20%,50%)') // [ [ 270, 20, 50, 1 ], 'hsl' ]

// # in hexes is optional
parseColor('fff') // [ [ 255, 255, 255, 1 ], 'rgb' ]

// whitespace is ignored
parseColor('# a 5 a 5 a 5') // [ [ 165, 165, 165, 1 ], 'rgb' ]

// rgb/rgba and hsl/hsla are treated as aliases
parseColor('rgba(120,70,70,0.45)') // [ [ 120, 70, 70, 0.45 ], 'rgb' ]
parseColor('rgb(120,70,70,0.45)') // [ [ 120, 70, 70, 0.45 ], 'rgb' ]

// if the color is not valid
parseColor('not a valid color') // [undefined, undefined]

// also available as cjs
const { parseColor } = require('@szydlovski/color-parse/cjs');
```

# API

## parseColor(colorString)

Arguments:
- colorString - `string` - the string to parse for colors

Returns:
- [colorArray, colorSpace] - `array` - a tuple containing
  - colorArray - `array` - containing parsed color values, i.e. `[255,255,255]`
  - colorSpace - `string` - denoting the parsed color space, i.e. `rgb`

Throws:
- `TypeError` - if the first argument is not a `string`

# Specification and compatibility

- Parsing of hex strings with alpha values (i.e. `#ffffff00` or `#fff0`) is supported, and `#` in hexes is optional
- CSS only officially supports hexes, `rbg` and `hsl`. This library will also identify `hsv`, `hsb` (an alias of `hsv`) and `hwb` colors.
- CSS treats `rgb` as an alias for `rgba` and vice versa (the same goes for `hsl` and `hsla`), which is why this library will also parse alpha values from `rgb` and `hsl`, and add a default alpha of `1` if it's not present.
- Parsed values are not validated or clamped to any value range.
npm package: @szydlovski/tar-buffer
Description: utilities for working with tar archives as buffers
Author: Kamil Szydlowski
Latest version: 0.1.0

# tar-buffer

Simple utilities for extracting tar archives into buffers, and creating archive buffers from a list of paths and buffers. Uses the `tar` package under the hood. Temporary files are written to the OS's temp folder.

# Usage

```
npm i @szydlovski/tar-buffer
```
```javascript
import { createTarBuffer, extractTarToBuffers } from '@szydlovski/tar-buffers';

(async () => {
  const files = [
    ['atextfile.txt', Buffer.from('hello world')],
    ['nested_directory/anothertextfile.txt', Buffer.from('hello again')]
  ];
  const archiveBuffer = await createTarBuffer(files);
  const archiveContents = await extractTarToBuffers(archiveBuffer);
  for (const [path, content] of archiveContents) {
    console.log(`${path} contains: ${content.toString()}`);
  }
  // prints
  // atextfile.txt contains: hello world
  // nested_directory\anothertextfile.txt contains: hello again
})();
```

# API

## createTarBuffer(files[, gzip = true])

Creates a tar archive containing the provided files.

Arguments:
- files - `array` - the files to include in the archive, in the format `[pathInArchive, bufferData]`, i.e. `['hello.txt', Buffer.from('hello world')]`
- gzip - `boolean` - optional, defaults to `true`, indicates whether the archive should be gzipped

Returns:
- `buffer` - containing the raw data of the created archive

## extractTarToBuffers(data)

Extracts files from the buffer of a tar archive.

Arguments:
- data - 'buffer' - the archive to be extracted

Returns:
- `array` - containing the extracted file paths and their buffers, in the format `[pathInArchive, bufferData]`, i.e. `['hello.txt', Buffer.from('hello world')]`
npm package: @szydlovski/zip
Description: convenience functions for JSZip
Author: Kamil Szydlowski
Latest version: 0.1.2

# zip

Convenience functions for JSZip.

# Usage

```
npm install @szydlovski/zip
```
```javascript
import { decodeZipFile, encodeZipFile } from '@szydlovski/zip';
import { promises as fs } from 'fs';

(async () => {
  const file = await fs.promises.readFile('path/to/archive.zip');
  const data = await decodeZipFile(file);
  const newFile = await encodeZipFile(data);
})();
```

# API

## decodeZipFile(file[, options = {}])

Decodes a zip file using JSZip and returns a flat plain object containing key value pairs corresponding to each file in the archive, i.e.:
```javascript
{
  'a text file.txt': UInt8Array[...],
  'path/to/folder/anotherfile.json': UInt8Array[...],
  'path/to/folder/image.jpg': UInt8Array[...]
}
```
Options:
- format - `string` - the format to return file data in, defaults to `uint8array`. Accepts formats supported by JSZip: `base64`, `text`, `binarystring`, `array`, `uint8array`, `arraybuffer`, `blob`, `nodebuffer`.
- includeDirs - `boolean` - whether to include intermediate & empty folders in the returned object, defaults to `false`. If true, the entries of folders will be set to `null`, otherwise they will be omitted.

## encodeZipFile(contents[, options = {}])

Encodes a zip file using JSZip and returns the resulting data. Accepts objects containing key value pairs corresponding to files and folders, just like the object returned by `decodeZipFile`.

Options:
- format - `string` - the format to return file data in, defaults to `uint8array`. Accepts formats supported by JSZip: `base64`, `text`, `binarystring`, `array`, `uint8array`, `arraybuffer`, `blob`, `nodebuffer`.
npm package: @szygadlinski/id-generator
Description: Simple package to generate random IDs from given numbers of characters.
Author: szygadlinski
Latest version: 1.0.2

Simple package to generate random IDs from given numbers of characters.

# Usage
``` js
const randomID = require('@szygadlinski/id-generator');

console.log(randomID(13));            // btiF6P62GEQlo
```
npm package: @szymmis/scaf
Description: A simple tool for scaffolding Advent of Code tasks
Author: szymmis
Latest version: 0.11.0

# 🏗️ scaf

> A simple tool for scaffolding Advent of Code tasks

[![npm](https://img.shields.io/npm/v/@szymmis/scaf)](https://www.npmjs.org/package/@szymmis/scaf)
[![downloads-per-week](https://img.shields.io/npm/dt/@szymmis/scaf?color=success)](https://www.npmjs.org/package/@szymmis/scaf)
[![license](https://img.shields.io/npm/l/@szymmis/scaf?color=purple)](https://www.npmjs.org/package/@szymmis/scaf)

## 🤔 Why Scaf?

[**Advent of Code**](https://adventofcode.com) is fun, but setting up tasks every day can be tedious. **scaf** simplifies this by automating the setup, letting you focus on solving puzzles. It does this by fetching task info directly from the website and creating a directory structure and files for the task, including the input data file.
You can select from [multiple languages](./templates/), as long as there is a template for that.

## 🚀 Usage

### Installation

Install **scaf** globally using npm to make it accessible as a CLI tool:

```bash
npm install -g @szymmis/scaf
```

### Authorizing into the AoC

- Go to the [Advent of Code](https://adventofcode.com/auth/login) website and login
- Open browser devtools and copy `session` cookie value
- Use `scaf login` command or setup the env variable `SCAF_TOKEN=<value>` in your shell

### Scaffolding a task

Use the **init** command to create a new task's folder and files for a specific day and programming language:

```bash
scaf init <lang> <year>/<day>
```

- `lang`: The programming language you want to use (e.g., `go`, `rust`, `py`).
- `year/day`: The Advent of Code year and day to scaffold (e.g., `2023/01`).

### Advancing to the second part

When you’re ready to tackle part two of the day's puzzle, use the `advance` command:

```bash
scaf advance <year/day>
```

- `year/day`: The year and day of the task you're advancing (e.g., `2023/01`).

This command generates the necessary files or updates your workspace to prepare for solving part two.

## ⚖️ License

[MIT](./LICENSE)
npm package: @szymonczy/nuxt-segment
Description: Nuxt.js module for Segment Analytics.js
Latest version: 0.2.11-allowchangingsrc.2

# nuxt-segment

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![Dependencies][david-dm-src]][david-dm-href]
[![Standard JS][standard-js-src]][standard-js-href]

> Nuxt.js module for Segment Analytics

This module uses [vue-segment](https://github.com/dansmaculotte/vue-segment) to add Segment Analytics to a Nuxt.js app.

[📖 **Release Notes**](./CHANGELOG.md)

## Setup

- Add `@dansmaculotte/nuxt-segment` dependency using yarn or npm to your project
- Add `@dansmaculotte/nuxt-segment` to `modules` section of `nuxt.config.js`
3. Configure it:

```js
{
  modules: [
    // Simple usage
    '@dansmaculotte/nuxt-segment',

    // With options
    [
      '@dansmaculotte/nuxt-segment',
      { /* module options */ }
    ],
  ],

  // Or with global options
  segment: {
    writeKey: '',
    disabled: false,
    useRouter: true
  }
}
```

## Options

### writeKey

- Type: `String`
  - Default: `process.env.SEGMENT_WRITE_KEY || ''`

### disabled

- Type: `Boolean`
  - Default: `process.env.SEGMENT_DISABLED || false`

### useRouter

- Type: `Boolean`
  - Default: `process.env.SEGMENT_USE_ROUTER || true`

## Usage

Inside a Vue component, the Segment `analytics` object is available as `this.$segment`:

```js
export default {
  mounted () {
    this.$segment.identify('f4ca124298', {
      name: 'Michael Bolton',
      email: 'mbolton@initech.com'
    });
    this.$segment.track('Signed Up', { plan: 'Enterprise' });
    this.$segment.page('Pricing');
  }
}
```

`$segment` is also injected into the [Nuxt context](https://nuxtjs.org/api/context/) so you can access it within your Vuex stores:

```js
export default {
  LOGOUT({ dispatch }) {
    return this.$auth.logout()
      .then(() => {
        this.$segment.reset();
        return dispatch('AFTER_LOGOUT');
      })
  }
}
```


## Development

- Clone this repository
- Install dependencies using `yarn install`
- Start development server using `npm run dev`

## License

[MIT License](./LICENSE.md)

<!-- Badges -->
[npm-downloads-src]: https://img.shields.io/npm/dt/@dansmaculotte/nuxt-segment.svg?style=flat-square
[npm-downloads-href]: https://npmjs.com/package/@dansmaculotte/nuxt-segment

[npm-version-src]: https://img.shields.io/npm/v/@dansmaculotte/nuxt-segment/latest.svg?style=flat-square
[npm-version-href]: https://npmjs.com/package/@dansmaculotte/nuxt-segment

[david-dm-src]: https://david-dm.org/dansmaculotte/nuxt-segment/status.svg?style=flat-square
[david-dm-href]: https://david-dm.org/dansmaculotte/nuxt-segment

[standard-js-src]: https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square
[standard-js-href]: https://standardjs.com
npm package: @szymonczy/vue-segment
Description: Vue.js plugin for Segment Analytics.js
Latest version: 0.2.9-allowchangingsrc

# vue-segment

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![Dependencies][david-dm-src]][david-dm-href]
[![Standard JS][standard-js-src]][standard-js-href]

> Vue.js plugin for Segment Analytics.js

[Segment Analytics.js Documentation](https://segment.com/docs/sources/website/analytics.js/)

## Setup

1. Add the `@dansmaculotte/vue-segment` dependency with `yarn` or `npm` to your project
2. Configure it:

```js
import Vue from 'vue'
import Segment from '@dansmaculotte/vue-segment'

Vue.use(Segment, {
  writeKey: 'YOUR_SEGMENT_WRITE_KEY',
  disabled: true,
  router,
  pageCategory: 'shop',
  settings: {
    ...
  }
})
```

## Usage

See [Segment Vue Quickstart Guide](https://github.com/segmentio/analytics-vue#how-to-get-started).

## Options

### writeKey

- Type: `String`
  - Default: `''`

### disabled

Disable automatic script loading, if you need compliance with GDPR.

- Type: `Boolean`
  - Default: `false`

### router

Call `analytics.page` method on `afterEach` router method if provided.

- Type: `Object`

### pageCategory

In case you provided router, you can specify the category page of the `page` event. See segment [page](https://segment.com/docs/sources/website/analytics.js/#page) method reference.

- Type: `String`,
  - Default: `''`

### settings

See [Load options](https://segment.com/docs/sources/website/analytics.js/#load-options) reference.

- Type: `Object`

## Development

1. Clone this repository
2. Install dependencies using `yarn install` or `npm install`
3. Start development server using `npm run dev`

## License

[MIT License](./LICENSE.md)

<!-- Badges -->

[npm-downloads-src]: https://img.shields.io/npm/dt/@dansmaculotte/vue-segment.svg?style=flat-square
[npm-downloads-href]: https://npmjs.com/package/@dansmaculotte/vue-segment

[npm-version-src]: https://img.shields.io/npm/v/@dansmaculotte/vue-segment/latest.svg?style=flat-square
[npm-version-href]: https://npmjs.com/package/@dansmaculotte/vue-segment

[david-dm-src]: https://david-dm.org/dansmaculotte/vue-segment/status.svg?style=flat-square
[david-dm-href]: https://david-dm.org/dansmaculotte/vue-segment

[standard-js-src]: https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square
[standard-js-href]: https://standardjs.com
npm package: @szymong110/easydatabase
Description: Easy database using json.
Author: SzymonG110
Latest version: 1.3.0

# Easy Database


## Example

```js
const EasyDB = require("@szymong110/easydatabase");
const db = new EasyDB("./some-database.json");

// Set data
db.set("Hello", "World");

// Has data
db.has("Hello"); // true

// Get data
db.get("Hello"); // World

// Delete data
db.delete("Hello");

db.get("Hello"); // undefined
db.has("Hello"); // false

db.set("age", 10);

// Add to data
db.add("age", 1); // 11

// Subtract from data
db.subtract("age", 9); // 2

db.set("array", [ "apple" ]);

// Push to data
db.push("array", "orange"); // [ "apple", "orange" ]

db.depush("array", "apple"); // [ "orange" ]

// Clear all data
db.clear();
```
npm package: @szymonjak/id-generator
Description: With this ID-generator you can create random IDs consisting of letters (capital and small) and numbers. You can set length of generated string.
Author: Szymon Jakubiak
Latest version: 1.0.3

# ID-generator

With this ID-generator you can create random IDs consisting of letters (capital and small) and numbers.
You can set length of generated string.

**Example**\
`const randomID = require('@szymonjak/id-generator');`

`console.log(randomID(10));`\
result: Xa4A2ioR5u

**Installation**\
You can simply instal this package using:
- npm\
$ npm install @szymonjak/id-generator
- yarn\
$ yarn add @szymonjak/id-generator