Skip to content

Commit 815bcd2

Browse files
committed
docs:added reference wiki links
1 parent 25c9761 commit 815bcd2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Conversions/SpeedConversion.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
/**
22
* Speed conversion
33
*
4+
* This function converts speed units including kilometers per hour (km/h),
5+
* meters per second (m/s), miles per hour (mph), and knots (knot).
6+
*
7+
* https://en.wikipedia.org/wiki/Kilometres_per_hour
8+
* https://en.wikipedia.org/wiki/Miles_per_hour
9+
* https://en.wikipedia.org/wiki/Metre_per_second
10+
* https://en.wikipedia.org/wiki/Knot_(unit)
11+
*
412
* chart for unit conversions.
513
*
614
* @constant {Object} speedChart
@@ -45,7 +53,7 @@ const convertSpeed = (speed, inputUnit, outputUnit) => {
4553
if (!(outputUnit in speedChart) || !(inputUnit in speedChartInverse)) {
4654
const validUnits = Object.keys(speedChartInverse).join(', ')
4755
throw new Error(
48-
`Incorrect 'inputUnit' or 'outputUnit' value: ${inputUnit}, ${outputUnit}\nValid values are: ${validUnits}`
56+
`Incorrect 'inputUnit' or 'outputUnit' value: ${inputUnit}, ${outputUnit}\n Valid values are: ${validUnits}`
4957
)
5058
}
5159

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy