xtype(5) === 'positive_integer'; // Value is number, positive and integer
xtype(5) === 'int+'; // 'int+' is same as 'positive_integer'
Unless there's some new ES6 magic I haven't heard about, Javascript does NOT permit operator overloading, so it should be impossible for an object to be === to more than one distinct string!Looking more closely, the library seems to be quite useful, has a test suite, and the real syntax is xtype.is(5, 'int+'). But if that's the case, just say that! Don't pass off some nonworking pseudocode as real JS code in your readme! There's a saying "where there's smoke, there's fire," and if there's this egregious a deception in your documentation, it makes me hesitant to depend on the library!