getify/monio

Feature: improve ergonomics of identity checks

オープン

#26 opened on 2022/04/25

 (0 件のコメント) (0 件のリアクション) (1 人の担当者)JavaScript (60 件のフォーク)github user discovery
enhancementgood first issuehelp wanted

Repository metrics

Stars
 (1,127 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

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

コントリビューターガイド