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 {
391391 if ( Array . isArray ( components ) ) {
392392 return this . tokenizer . hash ( Buffer . concat ( components ) ) ;
393393 }
394- else if ( util . isString ( components ) ) {
394+ else if ( typeof components === "string" ) {
395395 return this . tokenizer . parse ( components ) ;
396396 }
397397 return this . tokenizer . hash ( components ) ;
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ LocalTime.now = function (nanoseconds) {
124124 * @returns {LocalTime }
125125 */
126126LocalTime . fromDate = function ( date , nanoseconds ) {
127- if ( ! util . isDate ( date ) ) {
127+ if ( ! ( date instanceof Date ) ) {
128128 throw new Error ( 'Not a valid date' ) ;
129129 }
130130 //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) {
213213 targetType === 'number' ||
214214 targetType === 'string' ||
215215 Array . isArray ( targetProp ) ||
216- util . isDate ( targetProp ) ||
216+ targetProp instanceof Date ||
217217 targetProp . constructor . name !== 'Object' ) {
218218 target [ prop ] = source [ prop ] ;
219219 }
You can’t perform that action at this time.
0 commit comments