- [Dates]
isLessThan*
functions no longer return false positives when passed dates in the future.
- [Dates] New helper functions:
getDateDiff
, isLessThanOneMinuteAgo
, isLessThanOneHourAgo
, isLessThanOneDayAgo
, isLessThanOneWeekAgo
, and isLessThanOneYearAgo
.
- [Dates] Added new helper functions:
isSameDate
, isSameMonthAndYear
, isToday
, and isYesterday
.
- [Dates] Fixed
getNewRange()
when start
and end
date are the same but have different references #42
- [Dates] Added third parameter to
getWeeksForMonth
to specify what day the week starts on.
- Updates
focus
functions to match only non-disabled nodes
- Adds
clear
function to fastdom
. Usage:
import {write, read, clear} from '@shopify/javscript-utilities/fastdom';
const writeTask = write(...);
const readTask = read(..);
// later
clear(writeTask);
clear(readTask);
- Adds a
CHANGELOG
to document changes moving forward.
- The
autobind
decorator is now in the decorators
directory.
- WARNING any existing imports must be changed accordingly:
// old way
import autobind from '@shopify/javascript-utilities/autobind';
// new way
import {autobind} from '@shopify/javascript-utilities/decorators';
- Updated documentation in
README.md
and CONTRIBUTING.md
.
- Multiple decorators can now be used simultaneously (ex.
autobind
with debounce
).