@rooks/use-mutation-observer
Advanced tools
Comparing version 1.1.0-alpha.0 to 1.1.0
@@ -1,3 +0,14 @@ | ||
"use strict";var _react=require("react"),config={attributes:!0,characterData:!0,subtree:!0,childList:!0};module.exports=function(a,b){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:config;(0,_react.useEffect)(function(){// Create an observer instance linked to the callback function | ||
if(a.current){var d=new MutationObserver(function(a,c){b(a,c)});// Start observing the target node for configured mutations | ||
return d.observe(a.current,c),function(){d.disconnect()}}},[a.current,b,c])}; | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('react')) : | ||
typeof define === 'function' && define.amd ? define(['react'], factory) : | ||
(global = global || self, global.useMutationObserver = factory(global.React)); | ||
}(this, function (react) { 'use strict'; | ||
var config={attributes:!0,characterData:!0,subtree:!0,childList:!0};function useMutationObserver(a,b){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:config;react.useEffect(function(){// Create an observer instance linked to the callback function | ||
if(a.current){var d=new MutationObserver(function(a,c){b(a,c);});// Start observing the target node for configured mutations | ||
return d.observe(a.current,c),function(){d.disconnect();}}},[a.current,b,c]);} | ||
return useMutationObserver; | ||
})); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"main": "lib/index.js", | ||
"jsnext:main": "lib/index.esm.js", | ||
"module": "lib/index.esm.js", | ||
"license": "MIT", | ||
@@ -14,3 +16,3 @@ "description": "A React Hooks package for mutation-observer", | ||
"lint": "eslint src test", | ||
"build": "babel src --out-dir lib", | ||
"build": "rollup -c ../../scripts/rollup.config.js", | ||
"prepublish": "yarn run build" | ||
@@ -28,3 +30,3 @@ }, | ||
], | ||
"version": "1.1.0-alpha.0", | ||
"version": "1.1.0", | ||
"_id": "@rooks/use-mutation-observer@", | ||
@@ -38,3 +40,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "b094c85097d25a6f9587e4a9bb4f5cb302520951" | ||
"gitHead": "ace085776674cf83a285739385b6a9be7bfb34c5" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
60047
29
475