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

use-media

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-media - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

7

CHANGELOG.md

@@ -0,1 +1,8 @@

## [1.3.1](https://github.com/streamich/use-media/compare/v1.3.0...v1.3.1) (2019-07-27)
### Bug Fixes
* make useMedia work on server ([2349f0c](https://github.com/streamich/use-media/commit/2349f0c))
# [1.3.0](https://github.com/streamich/use-media/compare/v1.2.0...v1.3.0) (2019-03-13)

@@ -2,0 +9,0 @@

15

lib/index.js

@@ -8,2 +8,12 @@ "use strict";

};
var noWindowMatches = {
media: '',
addListener: noop,
removeListener: noop,
matches: false,
onchange: noop,
addEventListener: noop,
removeEventListener: noop,
dispatchEvent: function (_) { return true; }
};
var objectToString = function (query) {

@@ -32,3 +42,5 @@ if (typeof query === 'string')

var mounted = true;
var mql = window.matchMedia(query);
var mql = typeof window === 'undefined'
? noWindowMatches
: window.matchMedia(query);
var onChange = function () {

@@ -48,4 +60,5 @@ if (!mounted)

}; };
function noop() { }
exports.useMedia = createUseMedia(useEffect);
exports.useMediaLayout = createUseMedia(useLayoutEffect);
exports.default = exports.useMedia;

14

package.json
{
"name": "use-media",
"version": "1.3.0",
"version": "1.3.1",
"description": "useMedia React hook",

@@ -28,8 +28,8 @@ "main": "lib/index.js",

"devDependencies": {
"@semantic-release/changelog": "^3.0.2",
"@semantic-release/git": "^7.0.8",
"@semantic-release/npm": "^5.1.4",
"@types/react": "^16.8.2",
"semantic-release": "^15.13.3",
"typescript": "^3.1.3"
"@semantic-release/changelog": "3.0.4",
"@semantic-release/git": "7.0.16",
"@semantic-release/npm": "5.1.13",
"@types/react": "16.8.23",
"semantic-release": "15.13.18",
"typescript": "3.5.3"
},

@@ -36,0 +36,0 @@ "peerDependencies": {

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