
Node.js code examples
Browse 252 Node.js code examples across 26 topics, including posix paths, text encoding, binary buffers.
Jump to a topic
POSIX paths
Text encoding
Binary buffers
URLs
Query parameters
Assertions
Events
Streams
Compression
Utility functions
- Format a diagnostic message
- Format an object without colours
- Compare typed arrays deeply
- Promisify an error-first function
- Convert a promise to a callback
- Remove terminal colour escapes
- Parse an environment file string
- Check a value against a glob
- Inspect nested depth selectively
- Sort object keys for diagnostics
Runtime types
SQLite in Node
File URLs and Windows paths
- Extract a drive root
- Detect a drive-absolute path
- Detect a drive-relative path
- Normalize a mixed Windows path
- Join a Windows path on any OS
- Calculate a Windows relative path
- Identify a Windows path separator
- Split a Windows PATH list
- Compare Windows paths case-insensitively
- Extract a multi-dot Windows stem