forked from jchomaz/Vulture
Tracking de l'application VApp (IHM du jeu)
This commit is contained in:
10
VApp/node_modules/mpd-parser/src/utils/string.js
generated
vendored
Normal file
10
VApp/node_modules/mpd-parser/src/utils/string.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Converts the provided string that may contain a division operation to a number.
|
||||
*
|
||||
* @param {string} value - the provided string value
|
||||
*
|
||||
* @return {number} the parsed string value
|
||||
*/
|
||||
export const parseDivisionValue = (value) => {
|
||||
return parseFloat(value.split('/').reduce((prev, current) => prev / current));
|
||||
};
|
||||
Reference in New Issue
Block a user