New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

browser-sync-close-hook

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browser-sync-close-hook - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"name": "browser-sync-close-hook",
"version": "1.0.2",
"version": "1.0.3",
"description": "Closes Browser Tabs which are connected to browserSync once browserSync disconnects (when stopping gulp for example)",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -35,4 +35,11 @@ browser-sync-close-hook

Source
---
The only thing this module does is exporting a function string which useses the clients browsers window.close function to close the tab.
```js
module.exports = "___browserSync___.socket.on('disconnect', window.close.bind(window));";
```
Credits
---
https://gist.github.com/timthez for providing the original solution
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