import { lstatSync , readdirSync } from "fs" ; import { join } from "path" ; import { DataTypes , DataType } from "sequelize" ; export const isNumberType = ( type ) : boolean => type instanceof DataTypes . NUMBER ; export const isDateType = ( type ) : boolean => type instanceof DataTypes . DATE ; export const removeEspecialChars = ( value ) : string => value . replace ( /\D/gi , "" ) ; export const isDirectory = ( source ) : boolean => lstatSync ( source ) . isDirectory ( ) ; export const getDirectories = ( source ) : string [ ] => readdirSync ( source ) . filter ( ( name ) : boolean => isDirectory ( join ( source , name ) ) ) ;