Skip to content

Releases: RadLikeWhoa/Countable

Version 3.0.1

11 Jun 12:13
Compare
Choose a tag to compare
  • Added support for string parameter to Countable#count. You can now pass a single string instead of an element or a list of elements as the first parameter, e.g. Countable.count('hello world', callback).
  • Improve documentation.

Version 3.0.0

13 Jul 11:44
Compare
Choose a tag to compare
  • Countable::on and Countable::off replace Countable::live and Countable::die. The new methods work exactly the same, apart from the name change.

  • Countable::once has been removed. The method is now available exclusively as Countable::count.

  • Countable::enabled now accepts either single elements or lists of elements. When a list is passed, the validation checks if all elements have the Countable functionality.

  • Options have been simplified. Support for ignoreReturns and ignoreZeroWidthSpace has been removed in favour of a more general ignore option, which is an array of characters that should be ignored.

  • Added a minified version.

  • Removed legacy support. Countable now uses things like let and const and expects ES5 methods to be present. This mainly drops support for IE before version 11.

  • Reduced file size by almost 25%.

Version 2.1.1

01 May 20:07
Compare
Choose a tag to compare
  • Fixes a bug where IE9 would not react to DELETE, BACKSPACE and CUT commands.
  • Fixes a bug where Countable could not be concatenated with other files.

Version 2.1.0

06 Nov 10:41
Compare
Choose a tag to compare
  • Sentence counting has been added. The number of sentences (sentences) can be accessed as part of the counter object.
  • Countable.once is now aliased as Countable.count
  • Zero-width characters are now ignored by default. This can be changed using the ignoreZeroWidth option.

Version 2.0.2

14 Aug 09:13
Compare
Choose a tag to compare
  • Returns are counted as part of the all property. A new option ignoreReturns was added to restore the old behaviour.

Version 2.0.1

14 Aug 09:13
Compare
Choose a tag to compare
  • Missing parameter in Countable.once. (Thanks to MrOPR)

Version 2.0.0

14 Aug 09:12
Compare
Choose a tag to compare
  • Countable has a new Syntax. You can now use Countable.live, Countable.once, Countable.die and Countable.enabled. Notes on upgrading is provided in the README.
  • Countable can now work on multiple elements with one function call.
  • Prevent a XSS bug. (Thanks to Rob--W)

Version 1.4.2

14 Aug 09:12
Compare
Choose a tag to compare
  • Fix a bug where options wouldn't be applied correctly.

Version 1.4.1

14 Aug 09:12
Compare
Choose a tag to compare
  • Added option to execute the callback only once.

Version 1.4.0

14 Aug 09:11
Compare
Choose a tag to compare
  • Allow for an options object as the third parameter.