@trackunit/shared-utils 1.1.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +25 -25
- package/index.esm.js +25 -25
- package/package.json +1 -1
- package/src/index.d.ts +1 -1
package/index.cjs.js
CHANGED
|
@@ -1251,31 +1251,6 @@ const isSorted = (sortInput) => {
|
|
|
1251
1251
|
return originalKeys.every((key, index) => key === sortedKeys[index]);
|
|
1252
1252
|
};
|
|
1253
1253
|
|
|
1254
|
-
/**
|
|
1255
|
-
* Converts meters to yards
|
|
1256
|
-
*
|
|
1257
|
-
* @param value The value to convert
|
|
1258
|
-
* @returns {number | undefined} The converted value
|
|
1259
|
-
*/
|
|
1260
|
-
const convertMetersToYards = (value) => {
|
|
1261
|
-
if (isNaN(value)) {
|
|
1262
|
-
return;
|
|
1263
|
-
}
|
|
1264
|
-
return Math.round(value * 1.09361);
|
|
1265
|
-
};
|
|
1266
|
-
/**
|
|
1267
|
-
* Converts yards to meters
|
|
1268
|
-
*
|
|
1269
|
-
* @param value The value to convert
|
|
1270
|
-
* @returns {number | undefined} The converted value
|
|
1271
|
-
*/
|
|
1272
|
-
const convertYardsToMeters = (value) => {
|
|
1273
|
-
if (isNaN(value)) {
|
|
1274
|
-
return;
|
|
1275
|
-
}
|
|
1276
|
-
return Math.round(value * 0.9144);
|
|
1277
|
-
};
|
|
1278
|
-
|
|
1279
1254
|
/**
|
|
1280
1255
|
* Generates a version 3 UUID (namespace with MD5).
|
|
1281
1256
|
*
|
|
@@ -1306,6 +1281,31 @@ const uuidv4 = () => {
|
|
|
1306
1281
|
*/
|
|
1307
1282
|
const uuidv5 = (name, namespace) => uuid.v5(name, namespace);
|
|
1308
1283
|
|
|
1284
|
+
/**
|
|
1285
|
+
* Converts meters to yards
|
|
1286
|
+
*
|
|
1287
|
+
* @param value The value to convert
|
|
1288
|
+
* @returns {number | undefined} The converted value
|
|
1289
|
+
*/
|
|
1290
|
+
const convertMetersToYards = (value) => {
|
|
1291
|
+
if (isNaN(value)) {
|
|
1292
|
+
return;
|
|
1293
|
+
}
|
|
1294
|
+
return Math.round(value * 1.09361);
|
|
1295
|
+
};
|
|
1296
|
+
/**
|
|
1297
|
+
* Converts yards to meters
|
|
1298
|
+
*
|
|
1299
|
+
* @param value The value to convert
|
|
1300
|
+
* @returns {number | undefined} The converted value
|
|
1301
|
+
*/
|
|
1302
|
+
const convertYardsToMeters = (value) => {
|
|
1303
|
+
if (isNaN(value)) {
|
|
1304
|
+
return;
|
|
1305
|
+
}
|
|
1306
|
+
return Math.round(value * 0.9144);
|
|
1307
|
+
};
|
|
1308
|
+
|
|
1309
1309
|
exports.DateTimeFormat = DateTimeFormat;
|
|
1310
1310
|
exports.align = align;
|
|
1311
1311
|
exports.alphabeticallySort = alphabeticallySort;
|
package/index.esm.js
CHANGED
|
@@ -1249,31 +1249,6 @@ const isSorted = (sortInput) => {
|
|
|
1249
1249
|
return originalKeys.every((key, index) => key === sortedKeys[index]);
|
|
1250
1250
|
};
|
|
1251
1251
|
|
|
1252
|
-
/**
|
|
1253
|
-
* Converts meters to yards
|
|
1254
|
-
*
|
|
1255
|
-
* @param value The value to convert
|
|
1256
|
-
* @returns {number | undefined} The converted value
|
|
1257
|
-
*/
|
|
1258
|
-
const convertMetersToYards = (value) => {
|
|
1259
|
-
if (isNaN(value)) {
|
|
1260
|
-
return;
|
|
1261
|
-
}
|
|
1262
|
-
return Math.round(value * 1.09361);
|
|
1263
|
-
};
|
|
1264
|
-
/**
|
|
1265
|
-
* Converts yards to meters
|
|
1266
|
-
*
|
|
1267
|
-
* @param value The value to convert
|
|
1268
|
-
* @returns {number | undefined} The converted value
|
|
1269
|
-
*/
|
|
1270
|
-
const convertYardsToMeters = (value) => {
|
|
1271
|
-
if (isNaN(value)) {
|
|
1272
|
-
return;
|
|
1273
|
-
}
|
|
1274
|
-
return Math.round(value * 0.9144);
|
|
1275
|
-
};
|
|
1276
|
-
|
|
1277
1252
|
/**
|
|
1278
1253
|
* Generates a version 3 UUID (namespace with MD5).
|
|
1279
1254
|
*
|
|
@@ -1304,4 +1279,29 @@ const uuidv4 = () => {
|
|
|
1304
1279
|
*/
|
|
1305
1280
|
const uuidv5 = (name, namespace) => v5(name, namespace);
|
|
1306
1281
|
|
|
1282
|
+
/**
|
|
1283
|
+
* Converts meters to yards
|
|
1284
|
+
*
|
|
1285
|
+
* @param value The value to convert
|
|
1286
|
+
* @returns {number | undefined} The converted value
|
|
1287
|
+
*/
|
|
1288
|
+
const convertMetersToYards = (value) => {
|
|
1289
|
+
if (isNaN(value)) {
|
|
1290
|
+
return;
|
|
1291
|
+
}
|
|
1292
|
+
return Math.round(value * 1.09361);
|
|
1293
|
+
};
|
|
1294
|
+
/**
|
|
1295
|
+
* Converts yards to meters
|
|
1296
|
+
*
|
|
1297
|
+
* @param value The value to convert
|
|
1298
|
+
* @returns {number | undefined} The converted value
|
|
1299
|
+
*/
|
|
1300
|
+
const convertYardsToMeters = (value) => {
|
|
1301
|
+
if (isNaN(value)) {
|
|
1302
|
+
return;
|
|
1303
|
+
}
|
|
1304
|
+
return Math.round(value * 0.9144);
|
|
1305
|
+
};
|
|
1306
|
+
|
|
1307
1307
|
export { DateTimeFormat, HoursAndMinutesFormat, align, alphabeticallySort, arrayLengthCompare, arrayNotEmpty, booleanCompare, calculateImageScaleRatio, capitalize, colorsFromStyleDeclaration, convertBlobToBase64, convertMetersToYards, convertYardsToMeters, dateCompare, deleteUndefinedKeys, difference, doNothing, enumFromValue, enumFromValueTypesafe, enumOrUndefinedFromValue, exhaustiveCheck, fetchImageAsBase64, filterByMultiple, formatAddress, formatCoordinates, fuzzySearch, getAllColors, getDifferenceBetweenDates, getEndOfDay, getFirstLevelObjectPropertyDifferences, getISOStringFromDate, getMimeTypeFromDataURL, getResizedDimensions, getStartOfDay, groupBy, groupTinyDataToOthers, hourIntervals, intersection, isArrayEqual, isSorted, isUUID, isValidImage, loadSVGDimensions, nonNullable, numberCompare, numberCompareUnknownAfterHighest, objNotEmpty, objectEntries, objectFromEntries, objectKeys, objectValues, pick, preload, removeLeftPadding, resizeBlob, resizeImage, rgb2hex, size, stringCompare, stringCompareFromKey, stringNaturalCompare, stripHiddenCharacters, svgToPNG, titleCase, toID, toIDs, toPNG, toUUID, trimIds, trimPath, truthy, unionArraysByKey, uuidv3, uuidv4, uuidv5 };
|
package/package.json
CHANGED
package/src/index.d.ts
CHANGED