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

frame-throttle

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

frame-throttle - npm Package Compare versions

Comparing version 1.1.0 to 2.0.1

dist/frame-throttle.d.ts

35

CHANGELOG.md

@@ -6,4 +6,33 @@ # Change Log

## [1.1.0 - 2016-08-23]
## [2.0.1] - 2016-09-26
### Fixed
- `package.json` was misconfigured and didn't include the correct files
## [2.0.0] - 2016-09-26 [YANKED]
### Added
- `frame-throttle.d.ts` - a [TypeScript declaration file] for `frame-throttle.js`
### Changed
- Converted project to [TypeScript]
- Renamed main file from `throttle.js` to `frame-throttle.js`
- Moved main file from base directory to `dist` directory
- `throttle` method is now a module member rather than the entire module.
This means that you must now use:
```
// Correct
var throttle = require('frame-throttle').throttle;
```
rather than
```
// Wrong!
var throttle = require('frame-throttle');
```
- The throttled listener now passes its `this` context to the callback
- The callback is now passed the arguments for the most recent call to the
throttled method rather than being passed the oldest arguments.
This only happens when `requestAnimationFrame` is present.
### Known Issues
- `package.json` was misconfigured and didn't include the correct files
## [1.1.0] - 2016-08-23
### Fixed
- When [requestAnimationFrame] does not exist, call the callback immediately

@@ -24,3 +53,7 @@ and ignore further events for 1/60th of a second. Old behavior was to wait

[requestAnimationFrame]: https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
[TypeScript]: http://www.typescriptlang.org
[TypeScript declaration file]: https://www.typescriptlang.org/docs/handbook/writing-declaration-files.html
[2.0.1]: https://github.com/pelotoncycle/frame-throttle/compare/v1.1.0...v2.0.1
[2.0.0]: https://github.com/pelotoncycle/frame-throttle/compare/v1.1.0...v2.0.0
[1.1.0]: https://github.com/pelotoncycle/frame-throttle/compare/v1.0.0...v1.1.0

30

package.json
{
"name": "frame-throttle",
"version": "1.1.0",
"description": "A lightweight way to throttle events using requestAnimationFrame",
"main": "throttle.js",
"version": "2.0.1",
"description": "A lightweight way to throttle events and callbacks using requestAnimationFrame",
"main": "dist/frame-throttle.js",
"types": "dist/frame-throttle.d.ts",
"files": [
"README.md",
"dist/frame-throttle.js",
"dist/frame-throttle.d.ts"
],
"scripts": {
"test": "tape tests/*.tests.js",
"test-cov": "istanbul cover tape -- tests/*.tests.js",
"clean": "del-cli dist",
"lint": "npm run lint-noforce -- --force",
"lint-noforce": "tslint --project tsconfig.json",
"compile": "npm run clean && tsc",
"pretest": "npm run lint-noforce && npm run compile",
"prepublish": "npm test",
"test": "tape dist/tests/*.tests.js",
"test-cov": "npm run pretest && istanbul cover tape -- dist/tests/*.tests.js",
"coveralls": "npm run test-cov -- --report lcovonly && cat coverage/lcov.info | coveralls"
},
"keywords": [
"callback",
"events",

@@ -17,2 +30,3 @@ "frame",

"requestAnimationFrame",
"setTimeout",
"throttle"

@@ -31,3 +45,5 @@ ],

"devDependencies": {
"@types/sinon": "^1.16.31",
"coveralls": "^2.11.12",
"del-cli": "^0.2.0",
"istanbul": "0.4.5",

@@ -38,4 +54,6 @@ "jsdom": "^9.4.1",

"tape": "^4.6.0",
"tape-catch": "^1.0.6"
"tape-catch": "^1.0.6",
"tslint": "^3.15.1",
"typescript": "^2.0.3"
}
}
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