PHP 8.2.30
Preview: convert-param.ts Size: 403 B
//proc/thread-self/root/home/byroehnu/.trash/node_modules11/adminjs/src/utils/param-converter/convert-param.ts

const convertParam = (value: any, propertyType: string): any => {
  if (value === null || typeof value === 'undefined') {
    return value
  }

  if (propertyType === 'number') {
    return Number(value)
  }

  if (propertyType === 'boolean') {
    return Boolean(value)
  }

  if (['datetime', 'date'].includes(propertyType)) {
    return new Date(value)
  }

  return value
}

export { convertParam }

Directory Contents

Dirs: 0 × Files: 9

Name Size Perms Modified Actions
44 B lrw-r--r-- 2026-02-28 00:32:02
Edit Download
1.91 KB lrw-r--r-- 2026-02-28 00:32:02
Edit Download
990 B lrw-r--r-- 2026-02-28 00:32:02
Edit Download
819 B lrw-r--r-- 2026-02-28 00:32:02
Edit Download
403 B lrw-r--r-- 2026-02-28 00:32:02
Edit Download
44 B lrw-r--r-- 2026-02-28 00:32:28
Edit Download
537 B lrw-r--r-- 2026-02-28 00:32:40
Edit Download
1.47 KB lrw-r--r-- 2026-02-28 00:32:40
Edit Download
1.18 KB lrw-r--r-- 2026-02-28 00:32:46
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).