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

consolidate-jstransformer

Package Overview
Dependencies
Maintainers
5
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

consolidate-jstransformer - npm Package Compare versions

Comparing version 0.0.3 to 0.1.0

5

HISTORY.md
# Changelog
## v0.1.0: 2015-10-16
- Updated dependencies
- Switched to `semistandard` for formatting
## v0.0.3: 2015-08-17

@@ -4,0 +9,0 @@

52

index.js

@@ -1,6 +0,6 @@

'use strict'
'use strict';
var jstransformer = require('jstransformer')
var Promise = require('promise')
var transformers = require('list-of-jstransformers')
var jstransformer = require('jstransformer');
var Promise = require('promise');
var transformers = require('list-of-jstransformers');

@@ -15,4 +15,4 @@ /**

if (typeof options === 'function') {
fn = options
options = {}
fn = options;
options = {};
}

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

locals: options ? (options.locals || options) : options
}
};
}

@@ -32,9 +32,9 @@

module.exports[name] = function (file, options, fn) {
var transformer = jstransformer(require('jstransformer-' + name))
var args = extractArgs(options, fn)
var transformer = jstransformer(require('jstransformer-' + name));
var args = extractArgs(options, fn);
if (args.fn) {
return transformer.renderFileAsync(file, args.options, args.locals, function (err, result) {
args.fn(err, result.body ? result.body : null)
})
args.fn(err, result.body ? result.body : null);
});
}

@@ -44,9 +44,9 @@ return new Promise(function (fulfill, reject) {

if (err) {
reject(err)
reject(err);
} else {
fulfill(result.body)
fulfill(result.body);
}
})
})
}
});
});
};

@@ -57,9 +57,9 @@ /**

module.exports[name].render = function (str, options, fn) {
var transformer = jstransformer(require('jstransformer-' + name))
var args = extractArgs(options, fn)
var transformer = jstransformer(require('jstransformer-' + name));
var args = extractArgs(options, fn);
if (args.fn) {
return transformer.renderAsync(str, args.options, args.locals, function (err, result) {
args.fn(err, result.body ? result.body : null)
})
args.fn(err, result.body ? result.body : null);
});
}

@@ -69,9 +69,9 @@ return new Promise(function (fulfill, reject) {

if (err) {
reject(err)
reject(err);
} else {
fulfill(result.body)
fulfill(result.body);
}
})
})
}
})
});
});
};
});
{
"name": "consolidate-jstransformer",
"version": "0.0.3",
"version": "0.1.0",
"description": "Consolidate-compatible API to use JSTransformers.",

@@ -15,8 +15,11 @@ "keywords": [

"jstransformer-swig": "^0.1.2",
"standard": "^5.1.0",
"semistandard": "^7.0.2",
"testit": "^2.0.2"
},
"scripts": {
"test": "node test && standard"
"test": "node test && semistandard"
},
"engines": {
"node": ">=0.10.36"
},
"repository": {

@@ -34,4 +37,4 @@ "type": "git",

"list-of-jstransformers": "^1.0.4",
"promise": "^7.0.3"
"promise": "^7.0.4"
}
}
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