Trims whitespace in an array of GLSL tokens from glsl-tokenizer, used to minimize shader source size. Version 1.0.0 stable. Accepts optional boolean to remove all extraneous whitespace. Part of stackgl ecosystem. No active development since 2016.
npm install glsl-token-whitespace-trimNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Tokenizes GLSL source, trims all whitespace, and reconstructs string.
Always pass true or false explicitly: trim(tokens, true) or trim(tokens, false).
Be aware the input tokens array is modified; clone beforehand if needed.
Ensure tokens are from glsl-tokenizer (token.type, token.data, token.position, etc.).
Ensure trim() receives an array of token objects.
Verify each token is an object with expected properties.
No dependency data recorded yet.