Switched to tabs. Adding missing actor entries when scraping actors, with batch ID.
This commit is contained in:
@@ -1,48 +1,48 @@
|
||||
'use strict';
|
||||
|
||||
function inchesToCm(inches) {
|
||||
return Math.round(Number(inches) * 2.54);
|
||||
return Math.round(Number(inches) * 2.54);
|
||||
}
|
||||
|
||||
function feetInchesToCm(feet, inches) {
|
||||
if (typeof feet === 'string' && !inches) {
|
||||
const [feetPart, inchesPart] = feet.match(/\d+/g);
|
||||
return feetInchesToCm(feetPart, inchesPart);
|
||||
}
|
||||
if (typeof feet === 'string' && !inches) {
|
||||
const [feetPart, inchesPart] = feet.match(/\d+/g);
|
||||
return feetInchesToCm(feetPart, inchesPart);
|
||||
}
|
||||
|
||||
return Math.round((Number(feet) * 30.48) + (Number(inches) * 2.54));
|
||||
return Math.round((Number(feet) * 30.48) + (Number(inches) * 2.54));
|
||||
}
|
||||
|
||||
function cmToFeetInches(centimeters) {
|
||||
const feet = Math.floor(centimeters / 30.48);
|
||||
const inches = Math.round((centimeters / 2.54) % (feet * 12));
|
||||
const feet = Math.floor(centimeters / 30.48);
|
||||
const inches = Math.round((centimeters / 2.54) % (feet * 12));
|
||||
|
||||
return { feet, inches };
|
||||
return { feet, inches };
|
||||
}
|
||||
|
||||
function heightToCm(height) {
|
||||
const [feet, inches] = height.match(/\d+/g);
|
||||
const [feet, inches] = height.match(/\d+/g);
|
||||
|
||||
return feetInchesToCm(feet, inches);
|
||||
return feetInchesToCm(feet, inches);
|
||||
}
|
||||
|
||||
function lbsToKg(lbs) {
|
||||
const pounds = lbs.toString().match(/\d+/)[0];
|
||||
const pounds = lbs.toString().match(/\d+/)[0];
|
||||
|
||||
return Math.round(Number(pounds) * 0.453592);
|
||||
return Math.round(Number(pounds) * 0.453592);
|
||||
}
|
||||
|
||||
function kgToLbs(kgs) {
|
||||
const kilos = kgs.toString().match(/\d+/)[0];
|
||||
const kilos = kgs.toString().match(/\d+/)[0];
|
||||
|
||||
return Math.round(Number(kilos) / 0.453592);
|
||||
return Math.round(Number(kilos) / 0.453592);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
cmToFeetInches,
|
||||
feetInchesToCm,
|
||||
heightToCm,
|
||||
inchesToCm,
|
||||
lbsToKg,
|
||||
kgToLbs,
|
||||
cmToFeetInches,
|
||||
feetInchesToCm,
|
||||
heightToCm,
|
||||
inchesToCm,
|
||||
lbsToKg,
|
||||
kgToLbs,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user