Socket
Socket
Sign inDemoInstall

punch

Package Overview
Dependencies
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

punch - npm Package Compare versions

Comparing version 0.5.14 to 0.5.15

7

lib/content_handler.js

@@ -18,3 +18,8 @@ var _ = require("underscore");

_.each(config.plugins.parsers, function(value, key){
self.parsers[key] = module_utils.requireAndSetup(value, config);
var parser = module_utils.requireAndSetup(value, config);
var extensions = _.union( [key], (parser.supportedExtensions || []) );
_.each(extensions, function(extension) {
self.parsers[extension] = parser;
});
});

@@ -21,0 +26,0 @@ },

2

package.json

@@ -15,3 +15,3 @@ {

],
"version": "0.5.14",
"version": "0.5.15",
"homepage": "https://github.com/laktek/punch",

@@ -18,0 +18,0 @@ "author": "Lakshan Perera <lakshan@web2media.net> (http://laktek.com)",

@@ -36,8 +36,11 @@ var default_handler = require("../lib/content_handler.js");

spyOn(module_utils, "requireAndSetup").andCallFake(function(id, config){
return {"id": id};
if (id === "sample_markdown_parser") {
return { "id": id, "supportedExtensions": [".markdown", ".md"] };
} else {
return {"id": id};
}
});
default_handler.setup(sample_config);
expect(default_handler.parsers).toEqual({".markdown": {"id": "sample_markdown_parser"}, ".yml": {"id": "sample_yml_parser"}});
expect(default_handler.parsers).toEqual({".markdown": {"id": "sample_markdown_parser", "supportedExtensions": [".markdown", ".md"] }, ".md": {"id": "sample_markdown_parser", "supportedExtensions": [".markdown", ".md"] }, ".yml": {"id": "sample_yml_parser"}});
});

@@ -44,0 +47,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