open-index/open-npm huggingface dataset:
npm package: 15puzzle-utils
Description: Sliding puzzle utility library
Author: ebrancati
Latest version: 1.0.1

# 15puzzle-utils

Utility library for creating and manipulating sliding puzzles

## Installation

```bash
npm install 15puzzle-utils
```

## Usage

```ts
import { Puzzle } from '15puzzle-utils';

// Pick one of these constructors:
const puzzle = new Puzzle();     // 4x4, randomly shuffled
const puzzle = new Puzzle(3, 5); // custom size, randomly shuffled
const puzzle = new Puzzle([
    [1, 2, 3],
    [4, 5, 6],
    [7, 8, 0]
]); 

// Methods
puzzle.isSolved()         // true when puzzle is complete
puzzle.isSolvable()       // true when puzzle can be solved
puzzle.canSlide(row, col) // check if tile can slide
puzzle.slide(row, col)    // slide tile toward empty space
puzzle.getGrid()          // current state as number[][]
puzzle.getWidth()         // number of columns
puzzle.getHeight()        // number of rows
puzzle.getValue(row, col) // value at a specific cell
puzzle.getEmptyPosition() // { row, col } of the empty tile
puzzle.toAsciiString()    // text representation
```

## Error Handling

All errors extend `PuzzleError`, so you can catch them generically or handle specific cases:

```ts
import { Puzzle, PuzzleError, BlockedPathError } from '15puzzle-utils';

// Catch any puzzle error
try {
    puzzle.slide(row, col);
} catch (e) {
    if (e instanceof PuzzleError) { ... }
}

// Or handle specific cases
try {
    puzzle.slide(row, col);
} catch (e) {
    if (e instanceof BlockedPathError) { ... }
}
```

| Error | Thrown by |
|---|---|
| `InvalidDimensionError` | `constructor(width, height)`, `constructor(grid)` invalid width/height |
| `InvalidGridContentError` | `constructor(grid)` duplicate or out-of-range tile values |
| `InvalidPositionError` | `slide(row, col)`, `getValue(row, col)` row/col out of bounds |
| `EmptyTileSlideError` | `slide(row, col)` target cell is the empty tile |
| `BlockedPathError` | `slide(row, col)` tile not in same row or column as empty space |

## License

[MIT](LICENSE)
npm package: 1610edg-random
Description: random de mensajes
Author: Edgar
Latest version: 1.1.0


# random-messages

Proyecto de prueba que genera un nombre al azar cada que ejecuto el comando random-msg

## Install

```npm
npm install -g random-msg
```

# Usage

```bash
random-msg
```

# Contributing
If someone wants to add or improve something, I invite you to collaborate directly in this repository: [random-msg](https://github.com/platzi/npm-random-msg)

# License
random-msg is released under the [MIT License](https://opensource.org/licenses/MIT).
npm package: 163-music
Description: Netease Music SDK in Node.js
Author: lsong
Latest version: 0.0.2

## 163-music [![163-music](https://img.shields.io/npm/v/163-music.svg)](https://npmjs.org/163-music)

> Netease Music SDK in Node.js

### Installation

```bash
$ npm install 163-music
```

### Example


```javascript
const NeteaseMusic = require('163-music');

const nm = new NeteaseMusic({
    cookie: '__Your_Cookies__'
})

nm.search('Love Song').then(({ result }) => {
  const { songs } = result;
  songs.forEach(song => {
    console.log(`search(#${song.id}):`, song.name);
  });
})

nm.playlist('751387161').then(data => {
  console.log('歌单', data)
})

nm.picture('19124905253588326', 400).then(data => {
  console.log('图片地址', data)
})

nm.artist('4130').then(data => {
  console.log('艺术家', data)
})

nm.album('35327877').then(data => {
  console.log('歌单', data)
})

nm.lyric('479403027').then(data => {
  console.log('歌词', data)
})

nm.url('82360').then(({ data: resources }) => {
  resources.forEach(resource => {
    const { id, url } = resource;
    console.log(`song(#${id}):`, url);
  });
})

nm.song('479403027').then(data => {
  console.log('歌曲详情', data)
})
```


### Contributing
- Fork this Repo first
- Clone your Repo
- Install dependencies by `$ npm install`
- Checkout a feature branch
- Feel free to add your features
- Make sure your features are fully tested
- Publish your local branch, Open a pull request
- Enjoy hacking <3

### MIT

This work is licensed under the [MIT license](./LICENSE).

---
npm package: 1636
Description: Base16 to/from Base36 conversion
Author: yieme
Latest version: 1.0.0

# 1636

Base16 to/from Base36 conversion.

This library is for converting from base16 to base36 and then back to base16. It isn't intended to be universal. It won't go from base36 to base16 and back and this use case is beyond the scope of this library.

## Install

```sh
npm i 1636 --save
```

### Use

```js
var base = require('1636');
var b16  = 'bec0ef52ba44d576f529f82b25d8d550261c783ccb3e4c8d4da9c27abcecdf8a'
var b36  = base.to36(b16)
console.log(b36) // 11ogl0dnef9xafyqe04r3bm57go62hz7hyym6pxwj6wyarwui2yy
var back = base.to16(b36)
console.log(b16 == back) // true
```

### License MIT