light-bounds
Advanced tools
Comparing version
@@ -0,0 +0,0 @@ export declare type LightBoundsTarget = HTMLElement; |
@@ -1,7 +0,11 @@ | ||
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var throttleit_1 = __importDefault(require("throttleit")); | ||
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var throttle = require('throttleit'); | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var throttle__default = /*#__PURE__*/_interopDefaultLegacy(throttle); | ||
var watchedElements = new Map(); | ||
@@ -22,6 +26,5 @@ var lastResizeRefresh = 0; | ||
} | ||
exports.forceUpdate = forceUpdate; | ||
function initializeWatcher(throttleWait) { | ||
window.addEventListener('resize', throttleWait | ||
? throttleit_1.default(triggerHardUpdate, throttleWait) | ||
? throttle__default['default'](triggerHardUpdate, throttleWait) | ||
: triggerHardUpdate, { passive: true }); | ||
@@ -102,2 +105,5 @@ window.addEventListener('scroll', triggerSoftUpdate, { passive: true }); | ||
} | ||
exports.forceUpdate = forceUpdate; | ||
exports.lightBounds = lightBounds; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "light-bounds", | ||
"version": "0.0.7", | ||
"version": "0.1.0", | ||
"description": "Another getBoundingClientRect", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"main": "./dist/index.js", | ||
"module": "./dist/index.es.js", | ||
"types": "./dist/index.d.ts", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"build": "tsc", | ||
"start": "rollup -c -w", | ||
"build": "rollup -c", | ||
"prepublish": "npm run build" | ||
@@ -14,3 +15,3 @@ }, | ||
"type": "git", | ||
"url": "https://github.com/Onset/light-bounds.git" | ||
"url": "https://github.com/FilipChalupa/light-bounds.git" | ||
}, | ||
@@ -27,5 +28,2 @@ "keywords": [ | ||
"license": "ISC", | ||
"devDependencies": { | ||
"typescript": "^3.3.3" | ||
}, | ||
"prettier": { | ||
@@ -39,5 +37,17 @@ "semi": false, | ||
"dependencies": { | ||
"throttleit": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/throttleit": "^1.0.0", | ||
"throttleit": "^1.0.0" | ||
} | ||
"@rollup/plugin-commonjs": "^16.0.0", | ||
"@rollup/plugin-node-resolve": "^10.0.0", | ||
"prettier": "^2.1.2", | ||
"rollup": "^2.33.1", | ||
"rollup-plugin-peer-deps-external": "^2.2.4", | ||
"rollup-plugin-typescript2": "^0.29.0", | ||
"typescript": "^4.0.5" | ||
}, | ||
"files": [ | ||
"/dist/" | ||
] | ||
} |
@@ -0,0 +0,0 @@ # Light bounds |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
23541
146.71%1
-50%2
-33.33%8
700%7
-12.5%213
-19.62%1
Infinity%- Removed
- Removed