hack-linguist
Wrapper around atom-linguist
Last updated 5 years ago by jeffreyhoven .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install hack-linguist 
SYNC missed versions from official npm registry.

Hack-linguist

Simple wrapper on top of atom-linguist

Installation

npm i hack-linguist
var linguist = require("hack-linguist");

API

walkIdentify: walks through a directory and identifies each file
identify: Identifies the programming language for a single file
identifySync: Identifies the programming language for a file synchronously

Report

Report is the returned object when using walkIdentifySync It holds some useful data

Read more

Examples

...
linguist.identify('YOUR_FILE', function(err, language) {
	// error -> the possible error that occurred
	// language -> the identified language
});

var language = linguist.identify('YOUR_FILE');
...
var report = walkIdentifySync('YOUR_DIRECTORY');

Todo

Create an asynchronous version of walkIdentifySync

Current Tags

  • 1.0.0                                ...           beta (5 years ago)
  • 2.0.0                                ...           latest (5 years ago)

6 Versions

  • 2.0.0                                ...           5 years ago
  • 1.3.0                                ...           5 years ago
  • 1.2.0                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 6
Dependencies (3)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |