How to use the @uform/types.isNum function in @uform/types

To help you get started, we’ve selected a few @uform/types examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alibaba / uform / packages / utils / src / accessor.ts View on Github external
const parts = []

    for (let i = 0; i < pathArr.length; i++) {
      let p = pathArr[i]

      while (p[p.length - 1] === '\\' && pathArr[i + 1] !== undefined) {
        p = p.slice(0, -1) + '.'
        p += pathArr[++i]
      }

      parts.push(p)
    }
    PathCache.set(path, parts)
    return parts
  }
  if (isNum(path)) {
    return [path as number]
  }
  return []
}

@uform/types

> UForm数据校验工具

MIT
Latest version published 5 years ago

Package Health Score

68 / 100
Full package analysis

Similar packages