Socket
Socket
Sign inDemoInstall

compilerr

Package Overview
Dependencies
Maintainers
1
Versions
179
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

compilerr - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

2

package.json

@@ -23,3 +23,3 @@ {

},
"version": "0.3.0"
"version": "0.3.1"
}

@@ -47,3 +47,3 @@ 'use strict';

expressionRegex = /\${([^\.]+)((\.[^\(]+\(\))*)}/g;
expressionRegex = /\${([^\.\}]+)((\.[^\(]+\(\))*)}/g;
expressionResult = expressionRegex.exec(string);

@@ -50,0 +50,0 @@

@@ -43,2 +43,20 @@ 'use strict';

it('should return an error with a compiled message containing two variables', function () {
var err,
template;
template = {
message: 'A ${resource} at the url called "${url}" could not be found.'
};
err = compilerr.compile(template, {
resource: 'resource',
url: '/somewhere.json'
});
expect(err).to.be.an.instanceOf(Error);
expect(err.message).to.equal('A resource at the url called "/somewhere.json" could not be found.');
});
it('should return an error with a given status', function () {

@@ -45,0 +63,0 @@ var err,

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