How cloned2k16/_padleft works
_padLeft is a small JavaScript string-padding utility. A consumer calls its exported function with a value, target length, and optional pad string; the function returns the original string when no padding is needed, otherwise prepends padding. It uses cached strings for spaces, zeroes, and tabs, and repeat() for longer or custom padding. The source shows a Node setup and a browser-oriented branch; the README also documents browser availability. The graph is based on the README and the excerpted index.js.
Main entry points: index.js Padding function
Components 4
Other components
- JavaScript consumer
- Padding function
index.js - Padded string
- String prototypes
Connections 3
- JavaScript consumer → Padding function: calls
index.js - Padding function → Padded string: returns
index.js - Padding function → String prototypes: uses repeat
index.js