Releases: RadLikeWhoa/Countable
Version 3.0.1
- 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
-
Countable::on
andCountable::off
replaceCountable::live
andCountable::die
. The new methods work exactly the same, apart from the name change. -
Countable::once
has been removed. The method is now available exclusively asCountable::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
andignoreZeroWidthSpace
has been removed in favour of a more generalignore
option, which is an array of characters that should be ignored. -
Added a minified version.
-
Removed legacy support. Countable now uses things like
let
andconst
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
- 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
- Sentence counting has been added. The number of sentences (
sentences
) can be accessed as part of the counter object. Countable.once
is now aliased asCountable.count
- Zero-width characters are now ignored by default. This can be changed using the
ignoreZeroWidth
option.
Version 2.0.2
- Returns are counted as part of the
all
property. A new optionignoreReturns
was added to restore the old behaviour.
Version 2.0.1
- Missing parameter in
Countable.once
. (Thanks to MrOPR)
Version 2.0.0
- Countable has a new Syntax. You can now use
Countable.live
,Countable.once
,Countable.die
andCountable.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
- Fix a bug where options wouldn't be applied correctly.
Version 1.4.1
- Added option to execute the callback only once.
Version 1.4.0
- Allow for an options object as the third parameter.