Comparing version 1.0.14 to 1.0.15
{ | ||
"name": "js-awe", | ||
"version": "1.0.14", | ||
"version": "1.0.15", | ||
"homepage": "https://github.com/josuamanuel/js-awe", | ||
@@ -5,0 +5,0 @@ "author": "josuamanuel@hotmail.com", |
@@ -943,3 +943,14 @@ 'use strict' | ||
function isDateMidnight(date) { | ||
return date?.toISOString?.()?.substr(10, 14) === 'T00:00:00.000Z' | ||
} | ||
function setDateToMidnight(date) { | ||
if (isDate(date) === false) return date | ||
if (isDateMidnight(date) === true) return date | ||
return new Date(date.toISOString().substr(0, 10)) | ||
} | ||
const { | ||
@@ -1702,2 +1713,4 @@ colors, | ||
getSameDateOrPreviousFridayForWeekends, | ||
isDateMidnight, | ||
setDateToMidnight, | ||
replaceAll, | ||
@@ -1765,2 +1778,4 @@ cleanString, | ||
getSameDateOrPreviousFridayForWeekends, | ||
isDateMidnight, | ||
setDateToMidnight, | ||
replaceAll, | ||
@@ -1767,0 +1782,0 @@ cleanString, |
@@ -117,2 +117,13 @@ export default jsUtils; | ||
export function setAt(obj: any, valuePath: any, value: any): string; | ||
/** | ||
* Create a sorter function to use as a parameter in array.prototype.sort(sorter): | ||
* It can order by several fields. If fields are equal it will uneven using | ||
* subsequent fields. | ||
* @param paths List of paths to sort by. One path for each field to order by. Route path is | ||
* of the shape. ex: 'person.details.age'. If it is only one field it can be a string. | ||
* @param isAsc Optional. Default: true. true: to order ascending. false: to order descending | ||
* @returns Return a sorter function to include in array.prototype.sort(sorter) | ||
*/ | ||
export function sorterByPaths(paths: any, isAsc?: boolean): (objA: any, objB: any) => number; | ||
@@ -219,2 +230,4 @@ export function filterFlatMap(mapWithUndefinedFilterFun: any, data: any): any[]; | ||
export function getSameDateOrPreviousFridayForWeekends(date: any): any; | ||
export function isDateMidnight(date: Date):boolean; | ||
export function setDateToMidnight(date: Date): Date; | ||
export function replaceAll(str: any, ...fromTo: any[]): any; | ||
@@ -221,0 +234,0 @@ export function cleanString(str: any): any; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
221533
6695