
- Complete NestJS TypeScript implementation with WebSocket support - Direct messaging (DM) and group chat functionality - End-to-end encryption with AES encryption and key pairs - Media file support (images, videos, audio, documents) up to 100MB - Push notifications with Firebase Cloud Messaging integration - Mention alerts and real-time typing indicators - User authentication with JWT and Passport - SQLite database with TypeORM entities and relationships - Comprehensive API documentation with Swagger/OpenAPI - File upload handling with secure access control - Online/offline status tracking and presence management - Message editing, deletion, and reply functionality - Notification management with automatic cleanup - Health check endpoint for monitoring - CORS configuration for cross-origin requests - Environment-based configuration management - Structured for Flutter SDK integration Features implemented: ✅ Real-time messaging with Socket.IO ✅ User registration and authentication ✅ Direct messages and group chats ✅ Media file uploads and management ✅ End-to-end encryption ✅ Push notifications ✅ Mention alerts ✅ Typing indicators ✅ Message read receipts ✅ Online status tracking ✅ File access control ✅ Comprehensive API documentation Ready for Flutter SDK development and production deployment.
48 lines
1.5 KiB
Markdown
Executable File
48 lines
1.5 KiB
Markdown
Executable File
wide-align
|
|
----------
|
|
|
|
A wide-character aware text alignment function for use in terminals / on the
|
|
console.
|
|
|
|
### Usage
|
|
|
|
```
|
|
var align = require('wide-align')
|
|
|
|
// Note that if you view this on a unicode console, all of the slashes are
|
|
// aligned. This is because on a console, all narrow characters are
|
|
// an en wide and all wide characters are an em. In browsers, this isn't
|
|
// held to and wide characters like "古" can be less than two narrow
|
|
// characters even with a fixed width font.
|
|
|
|
console.log(align.center('abc', 10)) // ' abc '
|
|
console.log(align.center('古古古', 10)) // ' 古古古 '
|
|
console.log(align.left('abc', 10)) // 'abc '
|
|
console.log(align.left('古古古', 10)) // '古古古 '
|
|
console.log(align.right('abc', 10)) // ' abc'
|
|
console.log(align.right('古古古', 10)) // ' 古古古'
|
|
```
|
|
|
|
### Functions
|
|
|
|
#### `align.center(str, length)` → `str`
|
|
|
|
Returns *str* with spaces added to both sides such that that it is *length*
|
|
chars long and centered in the spaces.
|
|
|
|
#### `align.left(str, length)` → `str`
|
|
|
|
Returns *str* with spaces to the right such that it is *length* chars long.
|
|
|
|
### `align.right(str, length)` → `str`
|
|
|
|
Returns *str* with spaces to the left such that it is *length* chars long.
|
|
|
|
### Origins
|
|
|
|
These functions were originally taken from
|
|
[cliui](https://npmjs.com/package/cliui). Changes include switching to the
|
|
MUCH faster pad generation function from
|
|
[lodash](https://npmjs.com/package/lodash), making center alignment pad
|
|
both sides and adding left alignment.
|