getify/monio

Feature: improve ergonomics of identity checks

Ouverte

#26 ouverte le 25 avr. 2022

 (0 commentaire) (0 réaction) (1 personne assignée)JavaScript (60 forks)github user discovery
enhancementgood first issuehelp wanted

Métriques du dépôt

Stars
 (1 127 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

In addition to things like IO.is(x) to determine if x is an IO monad instance, we can add Symbol.hasInstance to all the monad definitions so that a more ergonomic x isntanceof IO check will work properly.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/hasInstance

Guide contributeur