open-index/open-npm huggingface dataset:
npm package: @sindres/guard
Description: Dead simple, zero dependency nodejs permission manager.
Author: Sindre Slungaard
Latest version: 1.0.1

### Permission Guard
Dead simple, zero dependency nodejs permission manager.

Permissions are string based and can be split into nodes with a `dot` separator. Wildcards can be applied to each permission node.

### Installation
```nodejs
npm i @sindres/guard
```

### Example usage
```javascript
const guard = require('@sindres/guard');

let myPermissions = [
	'site.frontpage',
	'site.dashboard',
	'site.profiles.*'
];

let authorized = guard(myPermissions, [
	'site.frontpage',
	'site.profiles.comment',
	'site.profiles.delete'
]);

console.log(authorized) // true
```
npm package: @sindres/lightningmap
Description: Library that emits lightning locations in real time
Author: Sindre Slungaard
Latest version: 1.0.4

#### Library that emits lightning locations in real time from [lightningmaps.org](https://www.lightningmaps.org)


```javascript
const lightningmap = require('@sindres/lightningmap')

lightningmap.listen((lightning) => {
  console.log(lightning);
})
```
npm package: @sindresorhus/chunkify
Description: Split an iterable into evenly sized chunks
Author: Sindre Sorhus
Latest version: 2.0.0
Deprecated: Renamed to chunkify: https://www.npmjs.com/package/chunkify

# chunkify

> Split an iterable into evenly sized chunks

## Install

```sh
npm install @sindresorhus/chunkify
```

## Usage

```js
import chunkify from '@sindresorhus/chunkify';

console.log([...chunkify([1, 2, 3, 4], 2)]);
//=> [[1, 2], [3, 4]]

console.log([...chunkify([1, 2, 3, 4], 3)]);
//=> [[1, 2, 3], [4]]
```

## API

### chunkify(iterable, chunkSize)

Returns an iterable with the chunks. The last chunk could be smaller.

#### iterable

Type: `Iterable` *(for example, `Array`)*

The iterable to chunkify.

#### chunkSize

Type: `number` *(integer)*\
Minimum: `1`

The size of the chunks.

## Use-cases

### Batch processing

When dealing with large datasets, breaking data into manageable chunks can optimize the batch processing tasks.

```js
import chunkify from '@sindresorhus/chunkify';

const largeDataSet = [...Array(1000).keys()];
const chunkedData = chunkify(largeDataSet, 50);

for (const chunk of chunkedData) {
	processBatch(chunk);
}
```

### Parallel processing

Dividing data into chunks can be useful in parallel processing to distribute workload evenly across different threads or workers.

```js
import {Worker} from 'node:worker_threads';
import chunkify from '@sindresorhus/chunkify';

const data = [/* some large dataset */];
const chunkedData = chunkify(data, 20);

for (const [index, chunk] of chunkedData.entries()) {
	const worker = new Worker('./worker.js', {
		workerData: {
			chunk,
			index
		}
	});
}
```

### Network requests

Splitting a large number of network requests into chunks can help in managing the load on the network and preventing rate limiting.

```js
import chunkify from '@sindresorhus/chunkify';

const urls = [/* Array of URLs */];

const chunkedUrls = chunkify(urls, 10);

for (const chunk of chunkedUrls) {
	await Promise.all(chunk.map(url => fetch(url)));
}
```
npm package: @sindresorhus/class-names
Description: Conditionally join CSS class names together - Especially useful with React
Author: Sindre Sorhus
Latest version: 2.0.0

# class-names

> Conditionally join CSS class names together - Especially useful with React

## Install

```
$ npm install @sindresorhus/class-names
```

## Usage

```js
import classNames from '@sindresorhus/class-names';

classNames('unicorn', 'rainbow');
//=> 'unicorn rainbow'

classNames({awesome: true, foo: false}, 'unicorn', {rainbow: false});
//=> 'awesome unicorn'

classNames('unicorn', null, undefined, 0, 1, {foo: null});
//=> 'unicorn'

const buttonType = 'main';
classNames({[`button-${buttonType}`]: true});
//=> 'button-main'
```

```jsx
import classNames from '@sindresorhus/class-names';

const Button = props => {
	console.log(props);
	/*
	{
		type: 'success',
		small: true
	}
	*/

	const buttonClass = classNames(
		'button',
		{
			[`button-${props.type}`]: props.type,
			'button-block': props.block,
			'button-small': props.small
		}
	);

	console.log(buttonClass);
	//=> 'button button-success button-small'

	return <button className={buttonClass}>…</button>;
};
```

## API

### classNames(…input)

Conditionally join CSS class names together.

#### input

Type: `string | object`

Accepts a combination of strings and objects. When an object, only object keys with truthy values are included. Anything else is ignored.

## FAQ

### How is it different from [`classnames`](https://github.com/JedWatson/classnames)?

- Dedupes by default.
- Does not coerce numbers to strings.
- Does not support array input. Just use the spread operator.

## Related

- [react-extras](https://github.com/sindresorhus/react-extras) - Useful components and utilities for working with React
npm package: @sindresorhus/df
Description: Get free disk space info from `df -kP`
Author: Sindre Sorhus
Latest version: 5.0.0

# df

> Get free disk space info from [`df -kP`](https://en.wikipedia.org/wiki/Df_\(Unix\))

Works on any Unix-based system like macOS and Linux.

*Created because all the other `df` wrappers are terrible. This one uses simple and explicit parsing. Uses `execFile` rather than `exec`. Ensures better platform portability by using the `-P` flag. Returns sizes in bytes instead of kilobytes and the capacity as a float.*

## Install

```sh
npm install @sindresorhus/df
```

## Usage

```js
import {
	diskSpace,
	diskSpaceForFilesystem,
	diskSpaceForFilesystemOwningPath
} from '@sindresorhus/df';

console.log(await diskSpace());
/*
[
	{
		filesystem: '/dev/disk1',
		type: 'ext4',
		size: 499046809600,
		used: 443222245376,
		available: 55562420224,
		capacity: 0.89,
		mountpoint: '/'
	},
	…
]
*/

console.log(await diskSpaceForFilesystem('/dev/disk1'));
/*
{
	filesystem: '/dev/disk1',
	…
}
*/

console.log(await diskSpaceForFilesystemOwningPath('.'));
/*
{
	filesystem: '/dev/disk1',
	…
}
*/
```

## API

### diskSpace()

Returns a `Promise<object[]>` with a list of space info objects for each filesystem.

### diskSpaceForFilesystem(path)

Returns a `Promise<object>` with the space info for the given filesystem path.

- `filesystem` - Name of the filesystem.
- `type` - Type of the filesystem.
- `size` - Total size in bytes.
- `used` - Used size in bytes.
- `available` - Available size in bytes.
- `capacity` - Capacity as a float from `0` to `1`.
- `mountpoint` - Disk mount location.

#### path

Type: `string`

A path to a [filesystem device file](https://en.wikipedia.org/wiki/Device_file). Example: `'/dev/disk1'`.

### diskSpaceForFilesystemOwningPath(path)

Returns a `Promise<object>` with the space info for the filesystem the given path is part of.

#### path

Type: `string`

A path to a file/directory on the filesystem to get the space info for.
npm package: @sindresorhus/do-not-disturb
Description: Control the macOS `Do Not Disturb` feature
Author: Sindre Sorhus
Latest version: 2.1.0

# do-not-disturb

> Control the macOS `Do Not Disturb` feature

Note that this package does not work inside a [sandboxed](https://developer.apple.com/app-sandboxing/) app.

**If you want to see an official API for this, please copy-paste the [following](https://github.com/feedback-assistant/reports/issues/221) into a new [Feedback Assistant](https://developer.apple.com/bug-reporting/) report, and submit it to Apple. Apple uses duplicates as an indication for how popular a request is.**

## Install

```sh
npm install @sindresorhus/do-not-disturb
```

## Usage

```js
import doNotDisturb from '@sindresorhus/do-not-disturb';

await doNotDisturb.enable();
```

## API

### doNotDisturb

All the methods return a `Promise`. You only really need to `await` them if you use multiple methods at once.

#### `.enable(): Promise<void>`

#### `.disable(): Promise<void>`

#### `.toggle(force?): Promise<void>`

##### force

Type: `boolean`

Force it to be enabled/disabled.

#### `.isEnabled(): Promise<boolean>`

#### `.on('change', listener, options): EventEmitter`

Attach an event listener that gets called when the "Do Not Disturb" state changes.

##### options

Type: `object`

###### pollInterval

Type: `number`\
Default: `3000`

Interval in milliseconds at which the polling for the `change` event is made.

#### `.off('change', listener): EventEmitter`

Remove an event listener that was attached previously.

```js
import doNotDisturb from '@sindresorhus/do-not-disturb';

const listener = status => {
	console.log(`Do Not Disturb status: ${status}`);
}

doNotDisturb.on('change', listener, {pollInterval: 100});

// …

doNotDisturb.off('change', listener);
```

## Related

- [do-not-disturb-cli](https://github.com/sindresorhus/do-not-disturb-cli) - CLI for this module
- [dark-mode](https://github.com/sindresorhus/dark-mode) - Control the macOS dark mode
- [macos-wallpaper](https://github.com/sindresorhus/macos-wallpaper) - Manage the desktop wallpaper
- [file-icon](https://github.com/sindresorhus/file-icon) - Get the icon of a file or app as a PNG image
- [app-path](https://github.com/sindresorhus/app-path) - Get the path to an app
- [More…](https://github.com/search?q=user%3Asindresorhus+language%3Aswift)
npm package: @sindresorhus/fnv1a
Description: FNV-1a non-cryptographic hash function
Author: Sindre Sorhus
Latest version: 3.1.0

# fnv1a

> [FNV-1a](https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function) non-cryptographic hash function

[FNV-1a has outstanding distribution and collisions are rare.](https://softwareengineering.stackexchange.com/questions/49550/which-hashing-algorithm-is-best-for-uniqueness-and-speed/145633#145633)

FNV hashes are designed to be fast while maintaining a low collision rate. The FNV speed allows one to quickly hash lots of data while maintaining a reasonable collision rate. The high dispersion of the FNV hashes makes them well suited for hashing nearly identical strings such as URLs, hostnames, filenames, text, IP addresses, etc.

## Install

```sh
npm install @sindresorhus/fnv1a
```

## Usage

```js
import fnv1a from '@sindresorhus/fnv1a';

fnv1a('🦄🌈', {size: 32});
//=> 2868248295n

fnv1a('🦄🌈', {size: 128});
//=> 13487074350300261116944693128525960095n

Number(fnv1a('🦄🌈', {size: 32}));
//=> 2868248295

const bytes = new Uint8Array([240, 159, 166, 132, 240, 159, 140, 136]);
fnv1a(bytes, {size: 32});
//=> 2868248295n
```

## API

### fnv1a(value, options?)

Returns the hash as a positive `BigInt`.

If you need it as a `number`, use `32` as `size` and wrap the return value in `Number(…)`.

#### value

Type: `string | Uint8Array`

A string or UTF-8 bytes.

#### options

Type: `object`

##### size

Type: `number`\
Values: `32 | 64 | 128 | 256 | 512 | 1024`\
Default: `32`

The bit size of the hash.

##### utf8Buffer

Type: `Uint8Array`

A Uint8Array used to encode the string into UTF-8 bytes.

This array can be reused across calls to `fnv1a`. Doing so will improve performance because it avoids allocating a new Uint8Array when encoding the string.

The size of the array does not have to be large enugh to hold the entire string, but performance will be improved if it is.

This option is only used when `value` is a string.

```js
import fnv1a from '@sindresorhus/fnv1a';

const utf8Buffer = new Uint8Array(100);

fnv1a('🦄🌈', {size: 32, utf8Buffer});
//=> 2868248295n
```

## Related

- [djb2a](https://github.com/sindresorhus/djb2a) - DJB2a non-cryptographic hash function
- [sdbm](https://github.com/sindresorhus/sdbm) - SDBM non-cryptographic hash function
npm package: @sindresorhus/merge-streams
Description: Merge multiple streams into a unified stream
Author: Sindre Sorhus
Latest version: 4.0.0

# merge-streams

> Merge multiple streams into a unified stream

## Install

```sh
npm install @sindresorhus/merge-streams
```

## Usage

```js
import mergeStreams from '@sindresorhus/merge-streams';

const stream = mergeStreams([streamA, streamB]);

for await (const chunk of stream) {
	console.log(chunk);
	//=> 'A1'
	//=> 'B1'
	//=> 'A2'
	//=> 'B2'
}
```

## API

### `mergeStreams(streams: stream.Readable[]): MergedStream`

Merges an array of [readable streams](https://nodejs.org/api/stream.html#readable-streams) and returns a new readable stream that emits data from the individual streams as it arrives.

If you provide an empty array, the stream remains open but can be [manually ended](https://nodejs.org/api/stream.html#writableendchunk-encoding-callback).

#### `MergedStream`

_Type_: `stream.Readable`

A single stream combining the output of multiple streams.

##### `MergedStream.add(stream: stream.Readable): void`

Pipe a new readable stream.

Throws if `MergedStream` has already ended.

##### `MergedStream.remove(stream: stream.Readable): Promise<boolean>`

Unpipe a stream previously added using either [`mergeStreams(streams)`](#mergestreamsstreams-streamreadable-mergedstream) or [`MergedStream.add(stream)`](#mergedstreamaddstream-streamreadable-void).

Returns `false` if the stream was not previously added, or if it was already removed by `MergedStream.remove(stream)`.

The removed stream is not automatically ended.
npm package: @sindresorhus/safe-stringify
Description: Serialize objects to JSON with handling for circular references
Author: Sindre Sorhus
Latest version: 1.1.0
Deprecated: Renamed to safe-stringify (without the scope)

# safe-stringify

> Serialize objects to JSON with handling for circular references

`JSON.stringify()` throws an error if the object contains circular references. This package replaces circular references with `"[Circular]"`.

## Install

```sh
npm install @sindresorhus/safe-stringify
```

## Usage

```js
import safeStringify from '@sindresorhus/safe-stringify';

const foo = {a: true};
foo.b = foo;

console.log(safeStringify(foo));
//=> '{"a":true,"b":"[Circular]"}'

console.log(JSON.stringify(foo));
//=> TypeError: Converting circular structure to JSON
```

## API

### safeStringify(value, options?)

Returns a string.

*Note: There is no `replacer` option as I didn't need that, but “pull request welcome” if you need it.*

#### value

Type: `unknown`

The value to convert to a JSON string.

#### options

Type: `object`

##### indentation

Type: `'string' | 'number'`

The indentation of the JSON.

By default, the JSON is not indented. Set it to `'\t'` for tab indentation or the number of spaces you want.

## FAQ

### Why another safe stringify package?

The existing ones either did too much, did it incorrectly, or used inefficient code (not using `WeakSet`). For example, many packages incorrectly replaced all duplicate objects, not just circular references, and did not handle circular arrays.
npm package: @sindresorhus/string-hash
Description: Get the hash of a string
Author: Sindre Sorhus
Latest version: 2.0.0

# string-hash

> Get the hash of a string

Uses the non-cryptographic hash function [FNV-1a](https://github.com/sindresorhus/fnv1a).

Similar to Java's [`String#hashCode()`](https://en.m.wikipedia.org/wiki/Java_hashCode()).

## Install

```
$ npm install @sindresorhus/string-hash
```

## Usage

```js
import stringHash from '@sindresorhus/string-hash';

stringHash('🦄🌈');
//=> 2868248295

stringHash('👌😎');
//=> 2903279002
```

It returns the hash as a positive integer.
npm package: @sindresorhus/to-milliseconds
Description: Convert an object of time properties to milliseconds: `{seconds: 2}` → `2000`
Author: Sindre Sorhus
Latest version: 2.0.0

# to-milliseconds

> Convert an object of time properties to milliseconds: `{seconds: 2}` → `2000`

## Install

```
$ npm install @sindresorhus/to-milliseconds
```

## Usage

```js
import toMilliseconds from '@sindresorhus/to-milliseconds';

toMilliseconds({
	days: 15,
	hours: 11,
	minutes: 23,
	seconds: 20,
	milliseconds: 1
});
//=> 1337000001

setTimeout(() => {
	// …
}, toMilliseconds({minutes: 2}));
```

## API

### toMilliseconds(timeDescriptor)

#### timeDescriptor

Type: `object`

Specify an object with any of the following properties:

- `days`
- `hours`
- `minutes`
- `seconds`
- `milliseconds`
- `microseconds`
- `nanoseconds`

## Related

- [parse-ms](https://github.com/sindresorhus/parse-ms) - The inverse of this module
- [pretty-ms](https://github.com/sindresorhus/pretty-ms) - Convert milliseconds to a human readable string
npm package: @sindresorhus/transliterate
Description: Convert Unicode characters to Latin characters using transliteration
Author: Sindre Sorhus
Latest version: 2.3.1

# transliterate

> Convert Unicode characters to Latin characters using [transliteration](https://en.wikipedia.org/wiki/Transliteration)

Can be useful for [slugification](https://github.com/sindresorhus/slugify) purposes and other times you cannot use Unicode.

## Install

```sh
npm install @sindresorhus/transliterate
```

## Usage

```js
import transliterate from '@sindresorhus/transliterate';

transliterate('Fußgängerübergänge');
//=> 'Fussgaengeruebergaenge'

transliterate('Я люблю единорогов');
//=> 'Ya lyublyu edinorogov'

transliterate('أنا أحب حيدات');
//=> 'ana ahb hydat'

transliterate('tôi yêu những chú kỳ lân');
//=> 'toi yeu nhung chu ky lan'

transliterate('En–dashes and em—dashes are normalized');
//=> 'En-dashes and em-dashes are normalized'
```

## API

### transliterate(string, options?)

#### string

Type: `string`

String to transliterate.

#### options

Type: `object`

##### customReplacements

Type: `Array<string[]> | Map<string, string>`\
Default: `[]`

Add your own custom replacements.

The replacements are run on the original string before any other transformations.

This only overrides a default replacement if you set an item with the same key.

```js
import transliterate from '@sindresorhus/transliterate';

transliterate('Я люблю единорогов', {
	customReplacements: [
		['единорогов', '🦄']
	]
})
//=> 'Ya lyublyu 🦄'
```

You can also pass a `Map`:

```js
transliterate('foo & bar', {
	customReplacements: new Map([
		['&', 'and']
	])
})
//=> 'foo and bar'
```

##### locale

Type: `string`

[BCP-47](https://developer.mozilla.org/en-US/docs/Glossary/BCP_47_language_tag) language tag for language-specific transliteration.

When specified, uses language-specific replacement rules for characters that have different transliterations in different languages.

```js
import transliterate from '@sindresorhus/transliterate';

// Swedish: ä→a, ö→o, å→a
transliterate('Räksmörgås', {locale: 'sv'});
//=> 'Raksmorgas'

// German: ä→ae, ö→oe
transliterate('Räksmörgås', {locale: 'de'});
//=> 'Raeksmoergas'
```

### Supported locales

The following locales have specific replacement rules when using the `locale` option:

- `da` - Danish
- `de` - German
- `hu` - Hungarian
- `nb` - Norwegian Bokmål
- `sr` - Serbian
- `sv` - Swedish
- `tr` - Turkish

## Supported languages

Most major languages are supported.

This includes special handling for:

- Arabic
- Armenian
- Czech
- Danish
- Dhivehi
- Georgian
- German (umlauts)
- Greek
- Hungarian
- Latin
- Latvian
- Lithuanian
- Macedonian
- Pashto
- Persian
- Polish
- Romanian
- Russian
- Serbian
- Slovak
- Swedish
- Turkish
- Ukrainian
- Urdu
- Vietnamese

However, Chinese is [currently not supported](https://github.com/sindresorhus/transliterate/issues/1).

## Related

- [slugify](https://github.com/sindresorhus/slugify) - Slugify a string
npm package: @sindresorhus/tsconfig
Description: Shared TypeScript config for my projects
Author: Sindre Sorhus
Latest version: 8.1.0

# tsconfig

> Shared [TypeScript config](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) for my projects

This config makes TypeScript not do any polyfilling, so only use syntax and features available in the JavaScript environments you target.

## Install

```sh
npm install --save-dev @sindresorhus/tsconfig
```

*This config requires TypeScript >=5.9 and Node.js >=20.*

## Usage

`tsconfig.json`

```json
{
	"extends": "@sindresorhus/tsconfig"
}
```
npm package: @sindresorhus/xbar
Description: Simplifies xbar (previously known as BitBar) app plugin creation
Author: Sindre Sorhus
Latest version: 3.0.0
Deprecated: Renamed to xbar (without the scoped prefix)

# xbar

> Simplifies [xbar](https://github.com/matryer/xbar) (previous known as BitBar) app plugin creation

Create your plugin using a nice API instead of having to manually construct a big string.

*Requires xbar v2 or later.*

<img src="screenshot.png" width="232" height="196">

## Install

```sh
npm install @sindresorhus/xbar
```

## Usage

```js
#!/usr/bin/env node
import xbar, {separator, isDarkMode} from '@sindresorhus/xbar';

xbar([
	{
		text: '❤',
		color: isDarkMode ? 'white' : 'red',
		dropdown: false
	},
	separator,
	{
		text: 'Unicorns',
		color: '#ff79d7',
		submenu: [
			{
				text: ':tv: Video',
				href: 'https://www.youtube.com/watch?v=9auOCbH5Ns4'
			},
			{
				text: ':book: Wiki',
				href: 'https://en.wikipedia.org/wiki/Unicorn'
			}
		]
	},
	separator,
	'Ponies'
]);
```

Create a file with the above code in the xbar plugins directory and make sure to `chmod +x filename.js` it. [Read more.](https://github.com/matryer/xbar#installing-plugins)

**Note:** You need to either have a `package.json` file with `{"type": "module"}` or use the `.mjs` extension instead of `.js`.

*Change `node` in `#!/usr/bin/env node` to the path of your Node.js binary. This is a [known issue](https://github.com/matryer/xbar/issues/36) in xbar.*

## API

### xbar(items, options?)

#### items

Type: `Array<string | object>`

An item can be a string with the text or an object with the text in a `text` property and any of the `options`. The text can be multiple lines, but for the first item, only the first line will be shown in the menubar.

##### submenu

Type: `Array<string | object>`

It will add a submenu to the current item. A submenu is composed of an array of items.

#### options

Type: `object`

You can use any of the [supported options](https://github.com/matryer/xbar-plugins/blob/main/CONTRIBUTING.md#plugin-api).

Applies to all items unless overridden in the item.

### separator

Add a separator.

### isDarkMode

Type: `boolean`

Check whether dark mode is enabled.

### isXbar

Type: `boolean`

Check whether the script is running from xbar.
npm package: @sinduja30/meter-todo
Description: A Meteor-based To-Do application
Author: Sinduja Kuna
Latest version: 1.1.4

**Simple To-Do App**

A basic to-do list application built with Meteor and Blaze/React, allowing users to add, remove, and manage tasks in real-time.

Features:
- Add and remove tasks easily
-  Mark tasks as completed
-  Simple and clean UI

Installation and Setup:

1. Clone the repository:
    - git clone https://github.com/Sinduja98/meteor_todo_app.git
    - cd simple-todos-kuna
2. Install Meteor (if not already installed):
   - curl https://install.meteor.com/ | sh
3. Run the application:
   - meteor run
4. Open in the browser:
   - Visit http://localhost:3000 in your web browser.
npm package: @sinedied/card
Description: Yohan Lasorsa's personal card
Author: Yohan Lasorsa
Latest version: 1.0.1

👋 Hi, I'm Yohan and I like to build *\*things\**.

More about me (needs [Node.js](https://nodejs.org)): `npx @sinedied/card`.

Now let's move on to code 👇
npm package: @sinedied/hue-cli
Description: Simple command line interface for Philips Hue
Author: Yohan Lasorsa
Latest version: 1.1.0

# hue-cli

[![NPM version](https://img.shields.io/npm/v/@sinedied/hue-cli.svg)](https://www.npmjs.com/package/@sinedied/hue-cli)
![Node version](https://img.shields.io/node/v/@sinedied/hue-cli.svg)
[![License](https://img.shields.io/npm/l/@sinedied/hue-cli.svg)](LICENSE)

> Simple command line interface for Philips Hue.

## Installation

```bash
npm install -g @sinedied/hue-cli
```

### Usage

```bash
Usage: hue [setup|scene|on|off]

Commands:
  setup            Configure hue bridge or show current config
    -l, --list     List bridges on the network
    -i, --ip       Set bridge ip (use first bridge if not specified)
    --force        Force setup if already configured
    
  s, scene <name>  Activate scene starting with <name>
    -l, --list     List scenes, using <name> as optional filter
    -m, --max <n>  Show at most <n> scenes when listing (10 by default)
    
  i, on            Switch all lights on  
  o, off           Switch all lights off
```
npm package: @sinemah/ray-js
Description: spatie ray JavaScript implementation
Author: SineMah
Latest version: 0.5.3

## ray for JS
JS implementation for spatie ray.

### Usage
Import  JS file into your DOM.
```html
<script src="ray.js"></script>
```

#### Configuration
There are some values you can configure. Default settings are compatible with ray defaults.
Ray uses `host_name` to bundle your messages. This lib will choose a `host_name` randomly if you don't.   
```javascript
debug.ray.config(
    {
        host: '127.0.0.1',
        port: 23517,
        host_name: 'test-app'
    }
);
```

```javascript
debug.ray.config({host_name: 'test-app'});

debug.ray.dump('hello there');
debug.ray.json({debug:true});
debug.ray.log('this is a log message');
debug.ray.notify('you should see a notification');
debug.ray.time();

debug.ray.custom(true, 'boolean');
debug.ray.custom({debug:true}, 'json');
```

You also can apply colors. Supported colors are
* green
* red
* orange
* gray
* blue
* purple

````javascript
debug.ray.dump('hello there').green();
debug.ray.dump('hello there').red();
````