# @xdanangelxoqenpm/veritatis-earum-molestiae

> [![Build Status](https://travis-ci.org/killtheliterate/@xdanangelxoqenpm/veritatis-earum-molestiae.svg?branch=master)](https://travis-ci.org/killtheliterate/@xdanangelxoqenpm/veritatis-earum-molestiae) [![Known Vulnerabilities](https://snyk.io/test/github

Latest version **1.0.0** (published 2024-04-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install @xdanangelxoqenpm/veritatis-earum-molestiae
pnpm add @xdanangelxoqenpm/veritatis-earum-molestiae
yarn add @xdanangelxoqenpm/veritatis-earum-molestiae
bun add @xdanangelxoqenpm/veritatis-earum-molestiae
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2024-04-25 |
| First published | 2024-04-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 24 |
| Unpacked size | 14.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | xdanangelxoqE |
| Maintainers | thanhmai019901 |
| Keywords | apollo, telephone, RegExp.prototype.flags, emit, rate, superstruct, jsx, xterm, format, Observable, proto, Array, defineProperty, mkdir, spinner, browser, promise, deep-clone, hash, es-shim API, writable, es, clone, flat, from, reduce, awesomesauce, date, safe, structuredClone, coercible, monorepo, id, Underscore, higher-order, package.json, tools, karma, es-abstract, whatwg, patch, CSS, symbols, toSorted, error, inference, ES3, sharedarraybuffer, ECMAScript 2021, installer, mime, watcher, side, scheme-validation, YAML, lazy, validate, look-up, String.prototype.trim, package, crypto, utilities, classnames, protocol-buffers, app, Int8Array, compare, watch, client, move, electron, parents, expression, negative, events, task, check, readable, xhr, Uint8ClampedArray, mixins, console, option, byteOffset, function, typed array, sham, var, find, byte, website, symlinks, width, vest, Object.fromEntries, mocha, call-bound, take, opener, ECMAScript 2017, reuse, property, optimist, ramda, consume, ES2016, typeof, command, transpile, syntax, listeners, trimStart, fastcopy, private data, regular expressions, pretty, streams, parse, collection.es6, idle, character, io-ts, formatting, private, core, validator, tape, ES5, Array.prototype.flatten, modules, crypt, dataView, wait, wrap, argument, sanitize, jsonschema, exit, obj, arguments, ECMAScript 2023, exec, extension, pose, sequence, traverse, fast, watching, JSON, styles, BigUint64Array, harmony, equality, matchAll, configurable, characters, stateless, Float64Array, spawn, ES2020, path, fs, logging, sorted, Array.prototype.filter, ansi, [[Prototype]], concatMap, jQuery, status, group, column, TypeBox, cors, get, bound, styling, shebang, shrinkwrap, data, some, typedarray, gdpr, view, lint, fast-deep-copy, compile less, WeakMap, write, Array.prototype.contains, chromium, less mixins, ReactiveExtensions, json, css nesting, @@toStringTag, Reflect.getPrototypeOf, point-free, schema, findLast, columns, framer, stringifier, log, browserlist, Map, bcrypt, type, escape, wordwrap, postcss, utils, helpers, StyleSheet, fast-copy, Rx, nope, serializer, map, dotenv, assign, minimal, slice, getintrinsic, redux-toolkit, file system, exit-code, deepclone, pipe, ascii, operating-system, Object.keys, uninstall, typedarrays, child, call, byteLength, indicator, computed-types, korean, variables, popmotion, banner, code points, css, Float32Array, Object.getPrototypeOf, includes, three, stable, ES8, Object, Object.assign, dom-testing-library, eslintplugin, form-validation, react-hooks, callbound, Stream, mkdirs, react pose, args, speed, fullwidth, full, bootstrap css, 3d, Uint32Array, less compiler, ECMAScript 2022, cli, toStringTag, debug, ES7, urls, dir, string, touch, sigint, push, ECMAScript 2015, find-up, syntaxerror, emoji, fixed-width, streams2, findup, $.extend, setImmediate, fastify, dependencies, ratelimit, WeakSet, random, glob, visual, password, progress, TypeScript, generics, querystring, editor, assertion, sigterm, joi, shared, Object.values, process, copy, fantasy-land, ArrayBuffer, l10n, types, URL, warning, Object.entries, styleguide, offset, chai, react-testing-library, classes, tdd, graphql, json-schema-validator, terminal, figlet, plugin, loading, output, url, commander, iteration, queueMicrotask, trimLeft, arrays, runtime |

## Links

- npm: https://www.npmjs.com/package/@xdanangelxoqenpm/veritatis-earum-molestiae
- Repository: https://github.com/xdanangelxoqenpm/veritatis-earum-molestiae
- Homepage: https://github.com/xdanangelxoqenpm/veritatis-earum-molestiae/#readme
- Issues: https://github.com/xdanangelxoqenpm/veritatis-earum-molestiae/issues
- npm.io page: https://npm.io/package/@xdanangelxoqenpm/veritatis-earum-molestiae

## Dependencies (24)

- [@osjwnpm/incidunt-saepe-dicta](https://npm.io/package/@osjwnpm/incidunt-saepe-dicta.md) ^1.0.0
- [@xdanangelxoqenpm/ex-vitae-eum](https://npm.io/package/@xdanangelxoqenpm/ex-vitae-eum.md) ^1.0.0
- [@xdanangelxoqenpm/sunt-neque-ut](https://npm.io/package/@xdanangelxoqenpm/sunt-neque-ut.md) ^1.0.0
- [@xdanangelxoqenpm/odio-nobis-quae](https://npm.io/package/@xdanangelxoqenpm/odio-nobis-quae.md) ^1.0.0
- [@xdanangelxoqenpm/unde-nam-dolores](https://npm.io/package/@xdanangelxoqenpm/unde-nam-dolores.md) ^1.0.0
- [@xdanangelxoqenpm/vel-ab-inventore](https://npm.io/package/@xdanangelxoqenpm/vel-ab-inventore.md) ^1.0.0
- [@xdanangelxoqenpm/quo-deleniti-ipsa](https://npm.io/package/@xdanangelxoqenpm/quo-deleniti-ipsa.md) ^1.0.0
- [@xdanangelxoqenpm/iusto-beatae-error](https://npm.io/package/@xdanangelxoqenpm/iusto-beatae-error.md) ^1.0.0
- [@xdanangelxoqenpm/vero-iure-nesciunt](https://npm.io/package/@xdanangelxoqenpm/vero-iure-nesciunt.md) ^1.0.0
- [@emiplegiaqmnpm/ad-aliquam-temporibus](https://npm.io/package/@emiplegiaqmnpm/ad-aliquam-temporibus.md) ^1.0.0
- [@xdanangelxoqenpm/occaecati-ullam-est](https://npm.io/package/@xdanangelxoqenpm/occaecati-ullam-est.md) ^1.0.0
- [@xdanangelxoqenpm/officiis-unde-iusto](https://npm.io/package/@xdanangelxoqenpm/officiis-unde-iusto.md) ^1.0.0
- [@xdanangelxoqenpm/ducimus-repellat-iste](https://npm.io/package/@xdanangelxoqenpm/ducimus-repellat-iste.md) ^1.0.0
- [@xdanangelxoqenpm/quia-libero-voluptate](https://npm.io/package/@xdanangelxoqenpm/quia-libero-voluptate.md) ^1.0.0
- [@xdanangelxoqenpm/aliquam-eligendi-nulla](https://npm.io/package/@xdanangelxoqenpm/aliquam-eligendi-nulla.md) ^1.0.0
- [@xdanangelxoqenpm/nostrum-sapiente-minus](https://npm.io/package/@xdanangelxoqenpm/nostrum-sapiente-minus.md) ^1.0.0
- [@xdanangelxoqenpm/numquam-maxime-laborum](https://npm.io/package/@xdanangelxoqenpm/numquam-maxime-laborum.md) ^1.0.0
- [@xdanangelxoqenpm/ullam-voluptas-dolorum](https://npm.io/package/@xdanangelxoqenpm/ullam-voluptas-dolorum.md) ^1.0.0
- [@xdanangelxoqenpm/assumenda-quidem-cumque](https://npm.io/package/@xdanangelxoqenpm/assumenda-quidem-cumque.md) ^1.0.0
- [@xdanangelxoqenpm/quo-tempora-praesentium](https://npm.io/package/@xdanangelxoqenpm/quo-tempora-praesentium.md) ^1.0.0
- [@xdanangelxoqenpm/labore-officia-similique](https://npm.io/package/@xdanangelxoqenpm/labore-officia-similique.md) ^1.0.0
- [@xdanangelxoqenpm/dolores-itaque-distinctio](https://npm.io/package/@xdanangelxoqenpm/dolores-itaque-distinctio.md) ^1.0.0
- [@xdanangelxoqenpm/impedit-distinctio-commodi](https://npm.io/package/@xdanangelxoqenpm/impedit-distinctio-commodi.md) ^1.0.0
- [@xdanangelxoqenpm/perspiciatis-molestias-alias](https://npm.io/package/@xdanangelxoqenpm/perspiciatis-molestias-alias.md) ^1.0.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2024-04-25

## README

[![Build Status](https://travis-ci.org/killtheliterate/@xdanangelxoqenpm/veritatis-earum-molestiae.svg?branch=master)](https://travis-ci.org/killtheliterate/@xdanangelxoqenpm/veritatis-earum-molestiae)
[![Known Vulnerabilities](https://snyk.io/test/github/killtheliterate/@xdanangelxoqenpm/veritatis-earum-molestiae/badge.svg?targetFile=package.json)](https://snyk.io/test/github/killtheliterate/@xdanangelxoqenpm/veritatis-earum-molestiae?targetFile=package.json)
[![Standard - JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
[![npm version](https://img.shields.io/npm/v/@xdanangelxoqenpm/veritatis-earum-molestiae.svg)](https://www.npmjs.com/package/@xdanangelxoqenpm/veritatis-earum-molestiae)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)

# @xdanangelxoqenpm/veritatis-earum-molestiae

An observable socket, no duh. Tested with
[ws](https://github.com/websockets/ws) and
[window.WebSocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket). 

`@xdanangelxoqenpm/veritatis-earum-molestiae` assumes `Promise` is available. If you're targeting an environment that does not
support native Promises, use
[babel-polyfill](https://babeljs.io/docs/usage/polyfill/) or something
similar.

# Usage

install it.

```shell
npm i @xdanangelxoqenpm/veritatis-earum-molestiae
```

import and use it.

```javascript
const ObservableSocket = require('@xdanangelxoqenpm/veritatis-earum-molestiae')
const WS = require('ws')

/**
 * Create an echo socket by connecting to the echo socket provided by
 * websocket.org.
 */
const echoSocket = ObservableSocket.create(new WS('wss://echo.websocket.org'))

/**
 * Subscribing to `echoSocket` receives messages from the underlying
 * WebSocket.
 */
echoSocket.down.subscribe(
  function next (msg) {
    console.log(msg.data)
  },

  function error (e) {
    console.error('uh oh! ', e)
  },

  function complete () {
    console.warn('Socket has closed')
  }
)

/**
 * We can send messages too!
 */
echoSocket.up('hi!')
```

```html
<script type="text/javascript">
    window.debug = lbl => msg => console.log(`${lbl}: ${msg}`) // debug however you like
</script>
<script type="text/javascript" src="https://unpkg.com/rxjs/bundles/rxjs.umd.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/@xdanangelxoqenpm/veritatis-earum-molestiae@6.0.0/dist/browser.min.js"></script>

<script>
    var socket = ObservableSocket.create(new WebSocket('wss://echo.websocket.org'))

    // Send messages up the socket
    socket.up('hello')

    // Receive messages down the socket
    socket.down.subscribe(
        msg => console.log(msg.data),
        () => console.log('done'),
        err => console.error(err)
    )
</script>
```

# API

This module exports a function that takes a WebSocket, and returns an object
with two properties, `up` and `down`.

## socket.up

`up` is a function to push messages up the socket. This will create
a queue of messages that will not be sent until the socket is connected.

## socket.down

`down` is an [RxJS](https://github.com/ReactiveX/RxJS) stream. You can
`subscribe` to it.

# Reconnecting...

`@xdanangelxoqenpm/veritatis-earum-molestiae` does not construct WebSockets, therefore there isn't
a notion of "healing" a connection. Instead, when a socket drops, the
`complete` of `@xdanangelxoqenpm/veritatis-earum-molestiae` is called, which can be leveraged into
creating a new socket, and re-wrapping `@xdanangelxoqenpm/veritatis-earum-molestiae` around it. An
example of how this can be done:

* [gist](https://gist.github.com/killtheliterate/2ec1f61d5404733d6918483730170447#file-index-js)

# Bundles and packages and boxes and goodies...

There are a few different bundles in `dist/`:

* browser
* commonjs
* esm

---
_Source: https://npm.io/package/@xdanangelxoqenpm/veritatis-earum-molestiae · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
