denoland / denoland/std

Question: value type check functions

Open
#5,714 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3.6k
Forks
681
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**

There are lots of type check functions in std (`isBoolean()`, `isObject()`, `isString()` etc). As of now, each module implements its own functions (`isObject()` is implemented in `assert/object_match.ts`, `expect/_utils.ts`, `yaml/utils.ts` for example).
I wonder if we should gather them in `@std/internal` or even make them public in another mod.

**Describe the solution you'd like**

Put all type check functions at the same place which all std mods import them.

**Describe alternatives you've considered**

Leave as is. There is the danger that once we have some type check functions, then we should provide all of them and over-engineer simple checks. `lodash` provides lots of checks which might not be necessary.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.