Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wspromisify

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wspromisify - npm Package Compare versions

Comparing version 0.0.401 to 0.0.501

.npmignore

48

package.json
{
"_from": "wspromisify@0.0.201",
"_id": "wspromisify@0.0.201",
"_args": [
[
"wspromisify@0.0.5",
"C:\\Users\\m.akiliev\\go\\workspace\\klb\\view"
]
],
"_from": "wspromisify@0.0.5",
"_id": "wspromisify@0.0.5",
"_inBundle": false,

@@ -11,8 +17,8 @@ "_integrity": "sha512-wWSjaaNK9B3wOYyw5DWhPq+AGRFx+4qBs0bbazPkNPwWwXnNLBcthnEBSZdyhqx8SGulRzV8DzH8IcUd9DbYsw==",

"registry": true,
"raw": "wspromisify@0.0.4",
"raw": "wspromisify@0.0.5",
"name": "wspromisify",
"escapedName": "wspromisify",
"rawSpec": "0.0.4",
"rawSpec": "0.0.5",
"saveSpec": null,
"fetchSpec": "0.0.201"
"fetchSpec": "0.0.5"
},

@@ -22,6 +28,6 @@ "_requiredBy": [

],
"_resolved": "https://registry.npmjs.org/wspromisify/-/wspromisify-0.0.201.tgz",
"_shasum": "e4a64f1815e2f59ec5081629187d2342d4b34c20",
"_spec": "wspromisify@0.0.201",
"_where": "C:\\Users\\m.akiliev\\Music\\WebsocketPromisify",
"_resolved": "https://registry.npmjs.org/wspromisify/-/wspromisify-0.0.5.tgz",
"_shasum": "6cf45bd945835d95ed2b0dcf6428a31d26002c74",
"_spec": "0.0.5",
"_where": "C:\\Users\\m.akiliev\\go\\workspace\\klb\\view",
"author": {

@@ -33,3 +39,3 @@ "name": "Michael Akiliev"

},
"bundleDependencies": [],
"bundleDependencies": false,
"deprecated": false,

@@ -50,4 +56,4 @@ "description": "Makes it easier to handle different data via WebSockets.",

"license": "ISC",
"main": "WS.js",
"module": "WS.esm.js",
"main": "dist/ws.js",
"module": "dist/ws.esm.js",
"name": "wspromisify",

@@ -59,5 +65,19 @@ "repository": {

"scripts": {
"test": "npm run test"
"test": "npm run test",
"dev": "rollup --watch -c --config src/rollup.config.js --environment INCLUDE_DEPS,BUILD:development",
"prod:cjs": "rollup -c --config src/rollup.config.js --environment INCLUDE_DEPS,BUILD:cjs",
"prod:es": "rollup -c --config src/rollup.config.js --environment INCLUDE_DEPS,BUILD:es",
"prod": "npm run prod:es && npm run prod:cjs"
},
"version": "0.0.401"
"version": "0.0.501",
"devDependencies": {
"@types/node": "^8.0.58",
"rollup": "^0.52.1",
"rollup-plugin-commonjs": "^8.2.6",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-sourcemaps": "^0.4.2",
"rollup-plugin-typescript2": "^0.8.4",
"typescript": "^2.6.2"
},
"types": "./index.d.ts"
}
# WebsocketPromisify
Makes websocket's API just like REST with Promise-like API, with native Promises.
// If you detected some bug or so, please, fill an issue.
Makes a Promise-like WebSocket connection.
If something sent before connection is connection is estabilished, it sends when its ready.
Features (almost all are tunable via constructor config below.)
- Async/await ready.
- ES-module and commonjs built-in.
- Types (d.ts) included.
- Automatically reconnects.
- Any id and data keys to negotiate with your back-end.
- Lazy connect: connects only if something sent, then send all of them!
- Supports middleware. E.g. you can use 'ws' package in Node!
- Custom easy .on method with or without condition: analog to .addEventListener.
- Can log messages/frames/response time into console or wherever you want to. (Hello, firefox 57+!)
- Any protocols field.
- Rejects if sent into closed socket or after some timeout without response.
- If something sent before connection is connection is estabilished, it sends when its ready.

@@ -25,2 +39,4 @@

reconnect: 2,
// Lazy connect: connects only if something sent (then sends all of them!)
lazy: false,
// You can set your own middleware here.

@@ -41,3 +57,5 @@ adapter: ((host, protocols) => new WebSocket(host, protocols)),

// sends any type of message.
send(message),
on(event_name, handler, predicate),
close()

@@ -50,3 +68,3 @@

import * as WSP from 'wspromisify' // Temporary. Will be regular esm.
import WSP from 'wspromisify'

@@ -53,0 +71,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc