dtable-utils
Advanced tools
Comparing version 4.2.9 to 4.3.0
import { getColumnType } from './core.js'; | ||
import { DATE_COLUMN_OPTIONS } from '../constants/column.js'; | ||
import { DATE_COLUMN_OPTIONS, DATE_FORMAT_MAP } from '../constants/column.js'; | ||
@@ -16,2 +16,14 @@ /** | ||
export { isDateColumn }; | ||
/** | ||
* Check whether the format is supported in date column | ||
* @param {string} format | ||
* @returns bool | ||
*/ | ||
var isSupportDateColumnFormat = function isSupportDateColumnFormat(format) { | ||
if (!format) { | ||
return false; | ||
} | ||
return format === DATE_FORMAT_MAP.YYYY_MM_DD || format === DATE_FORMAT_MAP.YYYY_MM_DD_HH_MM || format === DATE_FORMAT_MAP.YYYY_MM_DD_HH_MM_SS; | ||
}; | ||
export { isDateColumn, isSupportDateColumnFormat }; |
@@ -36,3 +36,3 @@ export { CellType } from './constants/cell-type.js'; | ||
export { createOption, generateOptionID, generatorCellOption, generatorCellOptions, getColumnOptions } from './column/option.js'; | ||
export { isDateColumn } from './column/date.js'; | ||
export { isDateColumn, isSupportDateColumnFormat } from './column/date.js'; | ||
export { isNumberColumn, isNumericColumn } from './column/number.js'; | ||
@@ -39,0 +39,0 @@ export { DateUtils } from './date.js'; |
@@ -20,2 +20,15 @@ 'use strict'; | ||
/** | ||
* Check whether the format is supported in date column | ||
* @param {string} format | ||
* @returns bool | ||
*/ | ||
var isSupportDateColumnFormat = function isSupportDateColumnFormat(format) { | ||
if (!format) { | ||
return false; | ||
} | ||
return format === column.DATE_FORMAT_MAP.YYYY_MM_DD || format === column.DATE_FORMAT_MAP.YYYY_MM_DD_HH_MM || format === column.DATE_FORMAT_MAP.YYYY_MM_DD_HH_MM_SS; | ||
}; | ||
exports.isDateColumn = isDateColumn; | ||
exports.isSupportDateColumnFormat = isSupportDateColumnFormat; |
@@ -190,2 +190,3 @@ 'use strict'; | ||
exports.isDateColumn = date$2.isDateColumn; | ||
exports.isSupportDateColumnFormat = date$2.isSupportDateColumnFormat; | ||
exports.isNumberColumn = number$2.isNumberColumn; | ||
@@ -192,0 +193,0 @@ exports.isNumericColumn = number$2.isNumericColumn; |
{ | ||
"name": "dtable-utils", | ||
"version": "4.2.9", | ||
"version": "4.3.0", | ||
"description": "dtable common utils", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
Sorry, the diff of this file is too big to display
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
663456
14793