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

watch-size

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

watch-size - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

index.cjs.js

5

CHANGELOG.md
# Changes to Watch Size
### 2.0.0 (June 24, 2018)
- The package now exports to commonjs and es modules, rather than attaching
itself to `this`.
### 1.0.0 (June 20, 2018)
- Initial version

22

package.json
{
"name": "watch-size",
"version": "1.0.0",
"version": "2.0.0",
"description": "Watch the size changes of a DOM element",

@@ -10,9 +10,11 @@ "author": "Jonathan Neal <jonathantneal@hotmail.com>",

"bugs": "https://github.com/jonathantneal/watch-size/issues",
"main": "index.iife.js",
"main": "index.cjs.js",
"module": "index.es.mjs",
"files": [
"index.iife.js"
"index.cjs.js",
"index.es.mjs"
],
"scripts": {
"build:iife": "babel index.js | uglifyjs -c unsafe=true --mangle --output index.iife.js; gzip-size index.iife.js",
"prepublishOnly": "npm test",
"pretest": "rollup -c .rollup.js --silent",
"test": "echo 'Running tests...'; npm run test:js",

@@ -22,11 +24,11 @@ "test:js": "eslint *.js --cache --ignore-path .gitignore --quiet"

"devDependencies": {
"babel-cli": "^6.26.0",
"babel-eslint": "^8.2.3",
"babel-core": "^6.26.3",
"babel-eslint": "^8.2.6",
"babel-preset-env": "^1.7.0",
"browserify": "^16.2.2",
"eslint": "^4.19.1",
"eslint": "^5.2.0",
"eslint-config-dev": "^2.0.0",
"gzip-size-cli": "^2.1.0",
"pre-commit": "^1.2.2",
"uglify-js": "^3.4.1"
"rollup": "^0.63.4",
"rollup-plugin-babel": "^3.0.7",
"rollup-plugin-uglify-es": "0.0.1"
},

@@ -33,0 +35,0 @@ "eslintConfig": {

@@ -21,3 +21,3 @@ # Watch Size [<img src="https://jonathantneal.github.io/dom-logo.svg" alt="PostCSS" width="90" height="90" align="right">][Watch Size]

```js
import 'watch-size';
import watchSize from 'watch-size';

@@ -37,5 +37,5 @@ const stop = watchSize(

This allows the listener to avoid polling, and to truly respond to size changes.
This technique can be used back to Internet Explorer 9.
This technique can be used in all browsers going back to Internet Explorer 9.
The entire script is about 400 bytes.
The entire script is about 400 bytes when minified and gzipped.

@@ -42,0 +42,0 @@ [cli-img]: https://img.shields.io/travis/jonathantneal/watch-size.svg

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