🚧 This project is currently being rewritten from scratch for better performance and maintainability.
The previous implementation has been moved to the deprecated/
folder.
Currently implementing core functions one by one with:
- Modern TypeScript practices
- Optimized performance
- Comprehensive testing
- Clean, maintainable code
Creates an array with all falsy values removed.
import { compact } from 'typescript-functional-programming';
compact([0, 1, false, 2, '', 3, null, undefined, NaN, 4])
// => [1, 2, 3, 4]
- ✅ Project structure setup
- ✅ TypeScript configuration
- ✅ Jest testing setup
- ✅
compact
function implemented - 🚧 More functions coming soon...
npm install typescript-functional-programming
# Install dependencies
npm install
# Build the library
npm run build
# Run tests
npm run test
# Run tests with coverage
npm run test:coverage
src/
├── arrays/ # Array-specific functions
│ └── index.ts # Array functions (compact, etc.)
├── __tests__/ # Test suites
│ └── arrays.test.ts
└── index.ts # Main entry point
deprecated/ # Previous implementation (archived)
├── src/ # Old source code
├── jest.config*.js # Old configs
└── tsconfig*.json # Old configs
- Fork the repository
- Create a feature branch
- Implement new functions with tests
- Ensure all tests pass
- Submit a pull request
MIT License - see LICENSE file for details.