File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -391,7 +391,7 @@ class Metadata {
391
391
if ( Array . isArray ( components ) ) {
392
392
return this . tokenizer . hash ( Buffer . concat ( components ) ) ;
393
393
}
394
- else if ( util . isString ( components ) ) {
394
+ else if ( typeof components === "string" ) {
395
395
return this . tokenizer . parse ( components ) ;
396
396
}
397
397
return this . tokenizer . hash ( components ) ;
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ LocalTime.now = function (nanoseconds) {
124
124
* @returns {LocalTime }
125
125
*/
126
126
LocalTime . fromDate = function ( date , nanoseconds ) {
127
- if ( ! util . isDate ( date ) ) {
127
+ if ( ! ( date instanceof Date ) ) {
128
128
throw new Error ( 'Not a valid date' ) ;
129
129
}
130
130
//Use the local representation, only the milliseconds portion
Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ function deepExtend(target) {
213
213
targetType === 'number' ||
214
214
targetType === 'string' ||
215
215
Array . isArray ( targetProp ) ||
216
- util . isDate ( targetProp ) ||
216
+ targetProp instanceof Date ||
217
217
targetProp . constructor . name !== 'Object' ) {
218
218
target [ prop ] = source [ prop ] ;
219
219
}
You can’t perform that action at this time.
0 commit comments