Skip to content

v5.2.2

Compare
Choose a tag to compare
@glen-cheney glen-cheney released this 04 Jun 05:26

Jest

Moved to jest for testing #278

TypeScript definitions #287

Fixes

  • Fix bad default parameters for enable, update, and getSize.
  • Fix missing Css export on Shuffle.ShuffleItem.Css.
  • Fix Shuffle.ALL_ITEMS and Shuffle.FILTER_ATTRIBUTE_KEY not being overridable.

New

  • Add types for .sort() method's options: SortOptions.
  • Add types for .filter()'s function signature.
  • Add types for ShuffleItem.Css.

Tests

  • Add test ts file.
  • Run tsc on test file during tests.

Breaking for TypeScript users:

  • Changed all Element to HTMLElement.
  • Shuffle.ShuffleOptions is now exported top-level.
    import Shuffle, { ShuffleOptions, SortOptions } from 'shufflejs';

Full changes: v5.2.1...v5.2.2