Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

artist

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

artist - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

CHANGES.md
# Artist changes
* 0.1.2
1. Fixed issue with options
* 0.1.1

@@ -4,0 +6,0 @@ 1. The MIT License

27

index.js

@@ -7,2 +7,11 @@ var defaults = {

function extend(dest) {
Array.prototype.slice.call(arguments, 1).forEach(function (src) {
for (var i in src) {
dest[i] = src[i];
}
});
return dest;
}
/**

@@ -20,13 +29,12 @@ * Returns a render function.

*
* @param {Options} opts
* @param {Options} options
* @return {Function}
*/
exports.render = function (opts) {
exports.render = function (options) {
var fs = require('fs'),
fest = require('fest'),
cache = {},
options = defaults;
cache = {};
for (var i in opts) options[i] = opts[i];
options = extend({}, defaults, options);

@@ -79,13 +87,12 @@ function verifyCache(ts, path, data, fn) {

*
* @param {Options} opts
* @param {Options} options
* @return {Function}
*/
exports.renderSync = function (opts) {
exports.renderSync = function (options) {
var fs = require('fs'),
fest = require('fest'),
cache = {},
options = defaults;
cache = {};
for (var i in opts) options[i] = opts[i];
options = extend({}, defaults, options);

@@ -92,0 +99,0 @@ function verifyCache(ts, path, data, fn) {

{
"name": "artist",
"version": "0.1.1",
"version": "0.1.2",
"description": "Template engine for node.js built on Fest",

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

@@ -68,5 +68,5 @@ var assert = require('assert'),

assert.equal(str, '');
assert.deepEqual(errors, [
"Cannot read property 'bar' of undefined2\nin block \"fest:value\" at line: 2\nfile: /Users/eprev/projects/WGD/artist/test/error-runtime.xml"
]);
// runtime errors
assert.equal(errors.length, 1);
assert(errors[0].match(/Cannot read property 'bar' of undefined/));
});

@@ -127,7 +127,7 @@ });

render(__dirname + '/error-runtime.xml', {});
assert.deepEqual(errors, [
"Cannot read property 'bar' of undefined2\nin block \"fest:value\" at line: 2\nfile: /Users/eprev/projects/WGD/artist/test/error-runtime.xml"
]);
// runtime errors
assert.equal(errors.length, 1);
assert(errors[0].match(/Cannot read property 'bar' of undefined/));
});
});
});
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