All Projects → withspectrum → micro-code-analyser

withspectrum / micro-code-analyser

Licence: MIT license
A tiny Node.js microservice to detect the language of a code snippet

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to micro-code-analyser

Go Ethereum Code Analysis
No description or website provided.
Stars: ✭ 2,032 (+9576.19%)
Mutual labels:  analysis, code
Lexical syntax analysis
编译原理词法分析器&语法分析器LR(1)实现 C++
Stars: ✭ 173 (+723.81%)
Mutual labels:  syntax, analysis
Vermin
Concurrently detect the minimum Python versions needed to run code
Stars: ✭ 218 (+938.1%)
Mutual labels:  analysis, detection
Chronos
Chronos - A static race detector for the go language
Stars: ✭ 272 (+1195.24%)
Mutual labels:  analysis, detection
Roassal2
Agile Visualization Engine for Pharo and VisualWorks
Stars: ✭ 23 (+9.52%)
Mutual labels:  analysis, code
Security Code Scan
Vulnerability Patterns Detector for C# and VB.NET
Stars: ✭ 550 (+2519.05%)
Mutual labels:  analysis, code
Code Surfer
Rad code slides <🏄/>
Stars: ✭ 5,477 (+25980.95%)
Mutual labels:  syntax, code
Gogrep
Search for Go code using syntax trees
Stars: ✭ 450 (+2042.86%)
Mutual labels:  syntax, code
SWELF
Simple Windows Event Log Forwarder (SWELF). Its easy to use/simply works Log Forwarder and EVTX Parser. Almost in full release here at https://github.com/ceramicskate0/SWELF/releases/latest.
Stars: ✭ 23 (+9.52%)
Mutual labels:  analysis, detection
napari-hub
Discover, install, and share napari plugins
Stars: ✭ 44 (+109.52%)
Mutual labels:  analysis, detection
Arachni
Web Application Security Scanner Framework
Stars: ✭ 2,942 (+13909.52%)
Mutual labels:  analysis, detection
KodeEditor
A simple code editor with syntax highlighting and pinch to zoom
Stars: ✭ 60 (+185.71%)
Mutual labels:  syntax, code
Awesome Carla
👉 CARLA resources such as tutorial, blog, code and etc https://github.com/carla-simulator/carla
Stars: ✭ 246 (+1071.43%)
Mutual labels:  code, detection
Netcap
A framework for secure and scalable network traffic analysis - https://netcap.io
Stars: ✭ 1,519 (+7133.33%)
Mutual labels:  analysis, detection
Phpgrep
Syntax-aware grep for PHP code.
Stars: ✭ 185 (+780.95%)
Mutual labels:  syntax, code
CodeEditorView
Code Editor UITextView
Stars: ✭ 20 (-4.76%)
Mutual labels:  syntax, code
volkscv
A Python toolbox for computer vision research and project
Stars: ✭ 58 (+176.19%)
Mutual labels:  analysis, detection
RAnalysisSkeleton
Files and settings commonly used in analysis projects with R
Stars: ✭ 15 (-28.57%)
Mutual labels:  analysis
Awesome Underwater Datasets
Pointers to large-scale underwater datasets and relevant resources.
Stars: ✭ 233 (+1009.52%)
Mutual labels:  detection
SwiftyCodeView
Fully customizable UI Component for verification codes written in swift with RxSwift support!
Stars: ✭ 86 (+309.52%)
Mutual labels:  code

micro-code-analyser

A tiny microservice to detect the language of a code snippet.

By running this microservice you won't have to add megabytes of JavaScript to your frontend just to detect what language a user is writing code in. This is especially useful for syntax highlighting in rich text/WYSIWYG editing scenarios!

Note: Language detection is done via the lang-detector module. This means micro-code-analyser currently supports JavaScript, C, C++, Python, Java, HTML, CSS, Ruby, Go and PHP.

Deployment

Your own micro-code-analyser is one click away!

Deploy to now

You can also deploy with a single command from the terminal (assuming you have now installed):

now withspectrum/micro-code-analyser

Usage

To get the language of a code snippet POST the text to your micro-code-analyser instance. For example in JavaScript:

fetch('micro-code-analyser-asdf123.now.sh', {
  method: 'POST',
  body: 'const a = "b";',
}).then(res => {
  // The microservice will return a status of 400 for invalid
  // or undetected code snippets
  if (res.status < 200 || res.status > 400) return;

  return res.text();
}).then(language => {
  console.log(`The code was written in ${language}.`);
  // => "The code was written in JavaScript"
});

Development

git clone [email protected]:withspectrum/micro-code-analyser
cd micro-code-analyser
npm i
npm run dev

Updating

The master branch of this repository is what you will be deploying. To update to a new version with potential bugfixes, all you have to do is run the now command again and change the URL you call in your app! 👌

License

Licensed under the MIT License, Copyright ©️ 2017 Space Program Inc. See LICENSE.md for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].