All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
3.2.0 - 2017-02-28
This limits length of the array returned
Usage:
Utils.getFlattenedFields(Object|Array, {limit: 100});
3.1.0 - 2017-02-22
Usage:
Utils.hasTZOffset('2017-02-22 13:26 -06:00') // true
This doesn't make JS dates timezone aware. It 'pretends' to by shifting the date. Usage:
Utils.applyTzOffset(new Date('2017-02-22'), 'America/Chicago'); // Returns a date shifted to the timezone specified
- Worked around a bug in SugarDate when sometimes
today at 3pm
would get parsed as the next day at 3pm.
3.0.2 - 2017-02-13
- Fixed an odd issue where regex was not working correctly causing dates to not be parsed correctly.
3.0.1 - 2017-02-13
- Fixed issues with parsing relative dates and times.
- The returned
.parsed
property fromparseDateTimeField
is completely backward compatible. - Improved tests. They now check the parsed date and not just if it parsed.
3.0.0 - 2017-02-08
- Timezone support for
Utils.parseDateTimeField()
- Locale support for
Utils.parseDateTimeField()
Utils.parseDateTimeField(date [, Object])
takes a second optional parameter of object.
timezone
defaults toUTC
locale
defaults toen
Usage:
Utils.parseDateTimeField('today at 3pm', {
timezone: 'Europe/London',
locale: 'en-GB'
});
Upgraded Sugar Date module from 1.x to 2.x. See Sugar breaking changes
Date
object no longer gets extended with SugarDate by default. If you want to extend the Date
object you must call Utils.activateDateParser()
.
2.1.0 - 2016-09-15
nonRetryableErrors
option to backoff module. This allows you to use your own 'non-retryable' error classes to halt the backoff if necessary.
2.0.0 - 2016-09-09
maxDuration
option to backoff module, to support abortion of backoff if the total operation time has or will exceed themaxDuration
parameter on the next retry.
Backoff module is now invoked differently. Instead of creating a new Backoff
object, and passing in the minDelay
and maxDelay
, you now pass everything into the attempt
or attemptAsync
methods.
Assuming the following operation:
var operation = function() {
return new Promise(function (resolve, reject) {
request(options, function(err, res, body) {
if(err) {
return reject(err);
}
resolve(body);
}
});
Old (1.x) syntax:
var backoff = new Backoff(100, 1000);
backoff.attemptAsync(5, operation).then(res => {
// Do something with result
}, err => {
// Do something with error
})
New (2.0) syntax:
var options = {
minDelay: 100,
maxDelay: 1000,
maxAttempts: 5
};
backoff.attemptAsync(operation, options).then(res => {
// Do something with result
}, err => {
// Do something with error
})
1.6.1 - 2016-08-23
NonRetryableError
to backoff module, to support early aborting of backoff.
1.6.0 - 2016-08-09
- Promise-style
attemptAsync
method to backoff module.
1.5.2 - 2016-07-01
- Reverted to ES5 syntax for node 0.10 and 0.12 compatibility.
1.5.1 - 2016-07-01
- hashToKeyValPairs utility function.
- Code coverage with istanbul.
1.5.0 - 2016-03-24
- Dumb console logger, with partial API compatibility with Winston.
1.4.0 - 2016-03-24
- Backoff utility.
1.3.1 - 2016-03-11
- Support for objects inside collections.
1.3.0 - 2016-03-10
- Support for 'flattened collections'.
1.2.0 - 2016-02-25
- Allow offset modifiers for datetime parsing to be in the form
date + 90d
anddate+90d
as well asdate +90d
.
1.1.4 - 2016-02-10
- Issues with
null
values fordatetime
orboolean
inputs.
- lodash and jasmine dependencies.
1.1.3 - 2016-02-09
- Correctly stringify
datetime
input annotated values.
1.1.2 - 2016-01-13
- Allow
y
orn
as valid boolean values.
1.1.1 - 2016-01-13
- Fixed issue when getting flattened fields for an object with a
length
property.
1.1.0 - 2015-09-22
- Added functions to label I/O data.
1.0.1 - 2015-05-02
- Fixed bug when getting a nested property when a higher-level property is
null
.
- Initial release.