GitShow/sindresorhus/component-type
sindresorhus

component-type

Type assertions aka less-broken `typeof`

by sindresorhus
Star on GitHubForknpm

JavaScript

96 stars21 forks16 contributorsQuiet · 2y agoSince 2012v2.0.0MIT

Meet the team

See all 16 on GitHub →
tj
tj7 contributions
juliangruber
juliangruber5 contributions
sindresorhus
sindresorhus5 contributions
Swatinem
Swatinem3 contributions
ianstormtaylor
ianstormtaylor3 contributions
chemzqm
chemzqm2 contributions
chrissrogers
chrissrogers1 contribution
cristiandouce
cristiandouce1 contribution

Languages

View on GitHub →
JavaScript100%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
85
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent fixes

View closed PRs →
coopr
Add a LICENSE file pleaseClosedIssue

and thanks!

coopr · 2y ago
xiaofen9
Another vulnerability in type() APIClosedIssue

Another vul similar to https://github.com/component/type/issues/25 is found in component-type. A crafted payload can forge an internal property (nodeType) to manipulate the type detection result.

xiaofen9 · 2y ago
xiaofen9
A vulnerability in type()ClosedIssue

We found that a maliciously crafted user-input object can type detection result of component-type module. The vulnerability is from the following code: component-type leverages the _isBuffer property from unsafe user-input to detect buffer type information. However, a crafted payload can overwrite this property to manipulate the type detection result. https://github.com/component/type/blob/a581cc14d0b46b8a4c96e2fc99fa76cd7faef5d9/index.js#L39-L46 Reproduce Script

xiaofen9 · 2y ago
Structured data for AI agents

Repository: sindresorhus/component-type. Description: Type assertions aka less-broken `typeof` Stars: 96, Forks: 21. Primary language: JavaScript. Languages: JavaScript (100%). License: MIT. Latest release: v2.0.0 (2y ago). Open PRs: 0, open issues: 0. Last activity: 2y ago. Community health: 85%. Top contributors: tj, juliangruber, sindresorhus, Swatinem, ianstormtaylor, chemzqm, chrissrogers, cristiandouce, dominicbarnes, ForbesLindesay and others.

·@ofershap

Replace github.com with gitshow.dev