ow icon indicating copy to clipboard operation
ow copied to clipboard

Alias `.of` for `.ofType`

Open Riim opened this issue 5 years ago • 1 comments

ow.array.of(ow.string) clearly better than ow.array.ofType(ow.string)

Riim avatar Oct 19 '19 15:10 Riim

I'm not interested in adding aliases. That just leads to inconsistent code.

I don't remember exactly why we went with .ofType. It might have been because ofType accepts any predicate, so ow.array.ofType(() => …) is clearer than ow.array.of(() => …).

I'll leave this open for other people to comment their opinion.

sindresorhus avatar Nov 12 '19 08:11 sindresorhus