New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hicat

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hicat - npm Package Compare versions

Comparing version 0.2.0 to 0.2.2

4

History.md

@@ -0,1 +1,5 @@

## v0.2.2 - July 30, 2014
* Fix `--lang` not working properly.
## v0.2.0 - July 30, 2014

@@ -2,0 +6,0 @@

2

index.js

@@ -21,3 +21,3 @@ var hljs = require('highlight.js');

try {
out = hljs.highlight(ext, str);
out = hljs.highlight(lang, str);
} catch (e) {

@@ -24,0 +24,0 @@ out = hljs.highlightAuto(str);

@@ -5,3 +5,3 @@ {

"license": "MIT",
"version": "0.2.0",
"version": "0.2.2",
"description": "Command-line syntax highlighter.",

@@ -8,0 +8,0 @@ "main": "index.js",

@@ -16,2 +16,28 @@ var expect = require('chai').expect,

describe('Explicitly setting the language', function() {
var out, input;
beforeEach(function () {
input = 'var x = 2 + "hi"; /*yo*/';
out = hicat(input, { lang: 'javascript' });
});
it('produces .language', function () {
expect(out.language).be.eql('javascript');
});
});
describe('Explicitly setting an invalid language', function() {
var str, out, input;
beforeEach(function () {
input = '{"a":2}';
out = hicat(input, { lang: 'aoeu' });
});
it('auto-detects the language', function () {
expect(out.language).be.eql('json');
});
});
describe('A simple example', function() {

@@ -40,3 +66,3 @@ var str, out, input;

var code = str.replace(/\033[^m]+m/g, '');
expect(code).eql('var x = 2 + "hi"; /*yo*/');
expect(code).eql(input);
});

@@ -43,0 +69,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc