@@ -45,7 +45,7 @@ var rounders = [ 'floor', 'ceil', 'round' ];
4545* @param {* } value - value to be validated
4646* @param {string } name - name to be used in error messages
4747* @throws {TypeError } value must either be a date string, Date object, Unix timestamp, or JavaScript timestamp
48- * @throws {Error } numeric date must be either a Unix or Javascript timestamp
48+ * @throws {Error } numeric date must be either a Unix or JavaScript timestamp
4949* @returns {Date } validated date
5050*/
5151function validDate ( value , name ) {
@@ -61,7 +61,7 @@ function validDate( value, name ) {
6161 }
6262 if ( type === 'number' ) {
6363 if ( ! timestamp . test ( value ) ) {
64- throw new Error ( format ( 'invalid argument. Numeric %s date must be either a Unix or Javascript timestamp.' , name . toLowerCase ( ) ) ) ;
64+ throw new Error ( format ( 'invalid argument. Numeric %s date must be either a Unix or JavaScript timestamp.' , name . toLowerCase ( ) ) ) ;
6565 }
6666 if ( value . toString ( ) . length === 10 ) {
6767 value *= 1000 ; // sec to ms
@@ -152,7 +152,7 @@ function datespace( start, stop, length, options ) {
152152 throw new TypeError ( format ( 'invalid option. `%s` option must be a string. Option: `%s`.' , 'round' , opts . round ) ) ;
153153 }
154154 if ( rounders . indexOf ( opts . round ) === - 1 ) {
155- throw new Error ( format ( 'invalid option. `%s` option must be one of [%s] .' , 'round' , rounders . join ( ', ' ) ) ) ;
155+ throw new Error ( format ( 'invalid option. `%s` option must be one of the following: "%s" .' , 'round' , rounders . join ( '", " ' ) ) ) ;
156156 }
157157 }
158158 }
0 commit comments