upper-case.ts 327 B

12345678910
  1. /**
  2. * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info.
  3. *
  4. * @author David Sehnal <david.sehnal@gmail.com>
  5. */
  6. export default function toUpperCase(value: any): string {
  7. if (!value) return '';
  8. return typeof value === 'string' ? value.toUpperCase() : `${value}`.toUpperCase();
  9. }