── POPULAR TAGS ──
#python (662)
#typescript (614)
#cli (564)
#hacktoberfest (491)
#cli-tool (483)
#react (480)
#javascript (449)
#rust (418)
#cross-platform (387)
#go (372)
#devops (318)
#ai (304)
#nodejs (298)
#llm (298)
#golang (287)
#android (272)
#open-source (256)
#docker (249)
#machine-learning (220)
#java (217)
#security (214)
#plugin-system (213)
#monorepo (213)
#self-hosted (211)
#linux (206)
#mcp (203)
#awesome-list (197)
#plugin-architecture (194)
#ai-agents (188)
#deep-learning (187)
This is a small, focused npm library that detects the indentation style (spaces vs tabs) and amount from a string of code. The core algorithm analyzes consecutive non-empty lines, counts indent changes, and uses a heuristic to ignore single-space indents initially to avoid false positives from alignment. It returns the detected type, amount, and the actual indent string. The implementation is clean, well-tested, and has zero runtime dependencies. It is a classic example of a single-purpose utility library with careful edge-case handling (e.g., mixed indentation, vendor-prefixed CSS, comments, CRLF line endings). The code is self-contained and could be easily extracted or reused in other projects.
RATING:
MAINT: maintained
DRIFT: low
▸ 1 reusable components found
── end of results ──