"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/common/src/util/misc.ts" between
fullcalendar-5.9.0.tar.gz and fullcalendar-5.10.0.tar.gz

About: FullCalendar is a full-sized drag & drop JavaScript event calendar.

misc.ts  (fullcalendar-5.9.0):misc.ts  (fullcalendar-5.10.0)
skipping to change at line 139 skipping to change at line 139
} }
/* String Utilities /* String Utilities
-------------------------------------------------------------------------------- --------------------------------------*/ -------------------------------------------------------------------------------- --------------------------------------*/
export function padStart(val, len) { // doesn't work with total length more than 3 export function padStart(val, len) { // doesn't work with total length more than 3
let s = String(val) let s = String(val)
return '000'.substr(0, len - s.length) + s return '000'.substr(0, len - s.length) + s
} }
export function formatWithOrdinals<Args extends any[]>(
formatter: string | ((...formatterArgs: Args) => string),
args: Args,
fallbackText: string,
) {
if (typeof formatter === 'function') {
return formatter(...args)
}
if (typeof formatter === 'string') { // non-blank string
return args.reduce((str, arg, index) => (
str.replace('$' + index, arg || '')
), formatter)
}
return fallbackText
}
/* Number Utilities /* Number Utilities
-------------------------------------------------------------------------------- --------------------------------------*/ -------------------------------------------------------------------------------- --------------------------------------*/
export function compareNumbers(a, b) { // for .sort() export function compareNumbers(a, b) { // for .sort()
return a - b return a - b
} }
export function isInt(n) { export function isInt(n) {
return n % 1 === 0 return n % 1 === 0
} }
 End of changes. 1 change blocks. 
0 lines changed or deleted 16 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)