open-index/open-npm huggingface dataset:
npm package: @m4rch/cookie
Description: a small package to manage html cookies
Author: m4rch
Latest version: 0.1.2

# @m4rch/cookie

even though way overdone i wanted to make my own package to manage cookies in html

## Installation

use npm

```
$ npm i @m4rch/cookie
```

or my own cdn

```html
<script src="https://cdn.m4rch.xyz/cookie.js"></script>
```

if you want to include it into jquery you can either use a cdn for both

```html
<script src="https://cdn.m4rch.xyz/jquery.js"></script>
```

or

```html
<script src="https://cdn.m4rch.xyz/cookie-jq.js"></script>
```

if you want to include jquery via another cdn

## documentation

if you are using one of the jquery variants then you are going to have to use `$.cookie` instead of `cookie`

### .set(name, value, options?)

```js
cookie.set("name", "value")
```

values automatically get encoded and decoded using encodeURIComponent and decodeURIComponent, respectively

JSON *objects* and *arrays* are automatically stringified with `JSON.stringify()` if they are passed as a value, *null* and *undefined* do not get assigned

options that can be passed are **path** and/or **expires** (in *days*)

```js
cookie.set("name", "value", { path: "/", expires: 365 })
```

the default for **path** is `/` and for **expires** is `""`, resulting in a session cookie

### .get(name?, options?)

for the value of a specific cookie use

```js
cookie.get("name")
```

values get automatically decoded using decodeURIComponent

JSON *objects* and *arrays* are automatically parsed by `JSON.parse()`, if you don't want that use

```js
cookie.get("name", { nojson: true })
```

for an `array` of every key-value pair use

```js
cookie.get()
```

or if you want an `object` of every cookie use

```js
cookie.get({ json: true })
```

### .remove(name, options?)

```js
cookie.remove("name")
```

if you want to specify a specific **path** use

```js
cookie.remove("name", { path: "" })
```

the default for **path** is `/`
npm package: @m4rch/create
Description: quickly create a project template.
Author: m4rch
Latest version: 1.1.4

<!-- omit in toc -->
# @m4rch/create

* [about](#about)
* [use](#use)
	* [install](#install)
	* [npx](#npx)
	* [api](#api)

## about

a small command-line-interface to quickly initialise a javascript, typescript or svelte project.

more templates get added when i need them.  
maybe.

## use

### install

to install it simply use

```sh
$ npm i @m4rch/create -g
```

and then use

```sh
$ create [dir]
```

to use this package

### npx

if you dont want to globally install the package you can just use npx

```sh
$ npx @m4rch/create
```

### api

this package only works with [esm](https://nodejs.org/api/esm.html)

```js
import create from "@m4rch/create"
```

```js
import { handler } from "@m4rch/create/handler"
```
npm package: @m4rch/extract-licenses
Description: quickly extract all licenses into a single LICENSES.md file
Author: m4rch
Latest version: 0.1.1

<!-- omit in toc -->
# @m4rch/extract-licenses

quickly extract all licenses into a single LICENSES.md file

# table of content

- [table of content](#table-of-content)
- [install](#install)
- [use](#use)
	- [cli](#cli)
	- [api](#api)

# install

```
$ npm install @m4rch/extract-licenses
```

# use

## cli

```
$ extract-licenses -h

  Description
    quickly extract all licenses into a single LICENSES.md file

  Usage
    $ extract-licenses [options]

  Options
    -v, --version    Displays current version
    -h, --help       Displays this message

  Examples
    $ extract-licenses
```

## api

```js
import extractLicenses from "@m4rch/extract-licenses"
```

the imported command takes a single argument: the directory, which will default to `process.cwd()` and returns a promise, that will resolve, once it is done
npm package: @m4rch/npm-check-updates
Description: check and update outdated dependencies in your package.json
Author: m4rch
Latest version: 0.1.4

# @m4rch/npm-check-updates

a low-dependency quick tool to update all the dependecies in your package.json

# use

## cli

```
$ ncu --help

  Description
    check and update outdated dependencies in your package.json

  Usage
    $ ncu [dir] [options]

  Options
    --semver         respect semantic versioning
    -u, --update     update the package.json file
    -i, --install    automatically install update [only with --update]
    -v, --version    Displays current version
    -h, --help       Displays this message
```

## api

```js
import ncu from "@m4rch/npm-check-updates"
```

`ncu` takes 2 arguments

```ts
function ncu ( pkg: pkg, options?: options ): Promise<deps>

interface pkg {
	[ key: string ]: string | number | boolean | null | pkg
}

interface options {
	semver?: boolean
}

type deps = dep[]

interface dep {
	name: string, // name of module
	from: "dependency" | "devDependency",
	old: string,  // old version
	new: string   // new version
}
```

### handler

```js
import handler from "@m4rch/npm-check-updates/handler"
```
npm package: @m4rch/sort-package-json
Description: sort your package.json
Author: m4rch
Latest version: 0.4.3

# @m4rch/sort-package-json

a package to sort your package.json

the package.json will be indented using tabs and have a newline at the end

this project is inpired by [keithamus](https://github.com/keithamus)' [sort-package-json](https://github.com/keithamus/sort-package-json), but works with a fraction of the dependencies

# use

you can either install it globally

```
$ npm i @m4rch/sort-package-json -g
```

and then use it via

```
$ sort-package-json
```

or

```
$ spj
```

or you can use npx

```
$ npx @m4rch/sort-pacakge-json
```

## cli

```
$ spj -h

  Description
    sorts your package.json

  Usage
    $ sort-package-json [dir] [options]

  Options
    -v, --version    Displays current version
    -h, --help       Displays this message

  Examples
    $ sort-package-json
    $ sort-package-json project
```

# api

you can import the package via

## main

```js
import sortPackage from "@m4rch/sort-package-json"
```

and then use it

```js
/*
	get the package content
*/

let sorted = sortPackage(pkg)

/*
	write the sorted package back using fs
*/
```

`sortPackage` takes two arguments:

- `pkg`
- `options`

`pkg` is either an object, a string or a buffer and is the content of the package.json file

`options` (optional) is an object containing the options you want to give to the sorter. current options are
- `stringify`: whether or not to stringify the result (default: `true`)

## handler

or you can import the handler

```js
import handler from "@m4rch/sort-package-json"
```

and just give as only argument the path (relative to where you execute the command)

```js
handler(".")
```
npm package: @m4rch/sv
Description: a simple file server with added live-reload functionality
Author: m4rch
Latest version: 0.1.7

# @m4rch/sv

this is a package for file-serving with automatically added live-reload functionality

# usage

## cli

```
$ sv --help
  Description
    quickly serve and live-reload a folder for development.

  Usage
    $ sv [dir] [options]

  Options
    -p, --port        specify the port  (default 4000)
    -o, --open        open the website in a browser
    -s, --static      disable live-reloading and content updates
    -d, --list-dir    always list directories
    -v, --version     Displays current version
    -h, --help        Displays this message

  Examples
    $ sv dist
    $ sv -p 5000
```

## api

you can import the serve function via

```js
import serve from "@m4rch/sv"
```

the serve function takes an object as the only argument.

```ts
interface options {
	dir: string // the directory you want to serve
	port: number // the port of the wished service
	wsPort: number // the port of the live-reload socket
	static?: boolean // whether or not to live-reload,
	listDir?: boolean // whether or not to always list directories
}
```

# credit

the ui is heavily inspired by the [sirv-cli](https://github.com/lukeed/sirv)
npm package: @m4rch/y
Description: a ytdl cli
Author: m4rch
Latest version: 0.1.0

# About

the @m4rch/y command line interface is a halfway working youtube-downloader designed mostly for mp3.

# Installation
```
$ npm i @m4rch/y -g
```

# Configuration

## path
to set up your path use the command

```
$ y -p "D:/your/path"
```

and be sure to either use a forward slash or to backwards slashes

# use

to use the downloader simply type

```
$ y video_id
```

or

```
$ y video_link
```

and either accept to what is automatically added by the downloader or change that and see the magic happen

# Options

options follow a simple construct: single character options use a single hypen like `-v` and can be concatenated like `-vp`, meaning that both "v" and "p" will be used as options.  
multi-character options use a double hyphen like `--version`.

## video

to download the video in mp4 format use either

```
$ y video_id -v
```

or

```
$ y video_id --video
```

## default

to use default values and skip the validation of, for example title, use

```
$ y video_id -y
```

## path

to use a custom path once use

```
$ y video_id -p "D:/your/path"
```

or

```
$ y video_id --path "D:/your/path"
```

# Commands

## version

to see your current version type

```
$ y -v
```