Skip to content

Releases: inorganik/countUp.js

2.9.0

02 Jun 12:53

Choose a tag to compare

Allows getting the endVal from the target element, thanks to @trymeouteh

2.8.2

25 Apr 13:05

Choose a tag to compare

Added types to exports in package.json, thanks to @thinkasany

2.8.1

23 Apr 13:36

Choose a tag to compare

Provide package.json "exports" for compatibility with modern build systems.

2.8.0

25 Aug 16:56

Choose a tag to compare

Added onStartCallback option, useful for when scroll spy is enabled, thanks to @cherrol !

2.7.0

28 Jun 17:10

Choose a tag to compare

Reverted change which made "main" in package.json point to the module file, instead of the umd file. It now points again at the umd file.

2.6.2

01 May 20:48

Choose a tag to compare

When revamping the build, I tried to resolve a rollup warning that had been occurring on the build for a long time:

"(!) `this` has been rewritten to `undefined`

It occurs because of typescript's Object.assign polyfill, which uses this on the global scope. If you set context: 'window' in the rollup config, it will silence the warning, but it will cause issues if CountUp is not run in the browser. Allowing rollup to rewrite this to undefined on just the global scope is harmless and doesn't break anything, so I reverted the change.

2.6.1

30 Apr 14:55
9c2f33c

Choose a tag to compare

This release doesn't change the CountUp code at all, just the distribution files - The requestAnimationFrame polyfill is no longer bundled with CountUp but served separately. The other files in dist remain the same. More details in the PR: #311

2.6.0

13 Mar 22:12
49e46aa

Choose a tag to compare

Support animation plugins: A plugin is a class instance or object passed in options for the plugin param that implements a render method:

export declare interface CountUpPlugin {
  render(elem: HTMLElement, formatted: string): void;
}

The plugin's render method will be called on each frame to display the formatted value instead of CountUp's.

v2.5.0

01 Mar 20:43
c12680a

Choose a tag to compare

Added new option, onCompleteCallback which gets called when the animation completes. You can still pass a callback to the start method, and it will override whatever is passed in the options.

2.4.2

28 Jan 17:58

Choose a tag to compare

Make it so when scroll spy is enabled, and scrollSpyOnce is false, CountUp will re-animate when scrolling up, as well as down, thanks to @paidge