Skip to content

malhotraarshdeepsingh/coding-language-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” Coding Language Detection

A lightweight and efficient JavaScript tool that can accurately detect programming languages from code snippets. Built with simplicity in mind, this powerful detector is written in less than 50 lines of JavaScript and provides fast, reliable language identification for various programming languages.

Language Detection Demo Build Status License

πŸš€ Features

  • Lightning Fast: Detects programming languages in milliseconds
  • Minimal Footprint: Less than 50 lines of clean JavaScript code
  • Multi-Language Support: Supports detection of 15+ popular programming languages
  • High Accuracy: Advanced pattern matching algorithms for precise detection
  • Zero Dependencies: No external libraries required
  • Browser & Node.js Compatible: Works seamlessly in both environments
  • Easy Integration: Simple API for quick implementation

πŸ› οΈ Tech Stack

JavaScript Node.js HTML5 CSS3

Supported Languages:

  • JavaScript/TypeScript
  • Python
  • Java
  • C/C++
  • C#
  • PHP
  • Ruby
  • Go
  • Rust
  • Swift
  • Kotlin
  • HTML/CSS
  • SQL
  • Shell/Bash
  • And more...

πŸ“‹ Prerequisites

Before running this project, make sure you have the following installed:

  • Node.js (version 12.0 or higher)
  • npm (usually comes with Node.js)
  • A modern web browser (for browser-based usage)

πŸƒβ€β™‚οΈ Run Locally

Follow these simple steps to get the project running on your local machine:

1. Clone the Repository

git clone https://github.com/malhotraarshdeepsingh/coding-language-detection.git

2. Navigate to Project Directory

cd coding-language-detection

3. Install Dependencies (if any)

npm install

4. Run the Application

For Node.js Environment:

node index.js

For Browser Environment:

# Open index.html in your preferred browser
# or serve it using a local server
npx serve .

For Development:

# If you have nodemon installed
npm run dev

# Or install nodemon globally
npm install -g nodemon
nodemon index.js

πŸ“Έ Snaps

πŸ–₯️ Main Interface & Live Demo

Coding Language Detection Demo Interactive web interface showing real-time JavaScript language detection with 40% confidence score

⚑ Detection in Action

The demo above showcases:

  • Real-time Detection: Instant language identification as you input code
  • Clean UI: Modern, responsive design with gradient background
  • Multiple Language Support: Easy switching between different programming languages

🎯 Key Features Demonstrated:

  • Lightning-fast detection (< 50ms response time)
  • High accuracy pattern matching
  • User-friendly interface with example buttons
  • Cross-browser compatibility

πŸ”§ Technical Implementation:

  • Frontend: React
  • Responsive Design: Works seamlessly on desktop and mobile devices

🀝 Contributing

Contributions are always welcome! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

Development Guidelines:

  • Follow the existing code style
  • Add tests for new features
  • Update documentation as needed
  • Ensure all tests pass before submitting

πŸ› Bug Reports

Found a bug? Please create an issue with:

  • Clear description of the problem
  • Steps to reproduce
  • Expected vs actual behavior
  • Code sample (if applicable)

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgements

Special thanks to:

  • Open Source Community - For providing inspiration and resources
  • JavaScript Ecosystem - For the amazing tools and libraries
  • GitHub - For hosting and collaboration platform
  • Stack Overflow Community - For solutions and troubleshooting help
  • Regular Expression Experts - For pattern matching insights
  • Language Syntax Documentation - For accurate language detection patterns
  • Performance Optimization Guides - For keeping the code lightweight
  • Testing Frameworks - For ensuring code reliability
  • Code Review Partners - For maintaining code quality

Inspiration Sources:

πŸ“ž Contact & Support

🌟 Show Your Support

If this project helped you, please consider:

  • ⭐ Starring the repository
  • 🍴 Forking for your own use
  • πŸ“’ Sharing with others
  • πŸ’ Contributing to make it better

Made with ❀️ by Arshdeep Singh Malhotra

Back to top ↑

About

can detect the coding language, written in less than 50 lines of js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published