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

angular-tpl2js

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-tpl2js - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

44

index.js

@@ -20,7 +20,7 @@ var async = require('async');

var obj3 = {};
for (var attrname in obj1) {
obj3[attrname] = obj1[attrname];
for (var a1 in obj1) {
obj3[a1] = obj1[a1];
}
for (var attrname in obj2) {
obj3[attrname] = obj2[attrname];
for (var a2 in obj2) {
obj3[a2] = obj2[a2];
}

@@ -139,7 +139,2 @@ return obj3;

// TODO - pathing madness
// TODO - refine templateUrl regex check
// TODO - identify failure points and return errors
// TODO - recurse deeply nested ng-include templates
function TemplateManager() {

@@ -154,3 +149,3 @@

// shift optional config argument
if(arguments.length === 2 && Object.prototype.toString.call(arguments[1]) == '[object Function]') {
if (arguments.length === 2 && Object.prototype.toString.call(arguments[1]) === '[object Function]') {
done = config;

@@ -161,9 +156,6 @@ } else {

// more robust gulp check mayhaps?
if (typeof input === 'object') {
var base, css;
var base = '/' + path.dirname(path.relative(__dirname, config.target));
var source = engine.source.hash(input.toString(), base);
engine.templates.get(source).then(function (transformed) {
function run(css) {
engine.templates.get(css).then(function (transformed) {
engine.templates.set(transformed).then(function (output) {

@@ -175,15 +167,13 @@ done(null, output); // -- out

});
}
if (input instanceof Buffer) {
base = '/' + path.dirname(path.relative(__dirname, config.target));
css = engine.source.hash(input.toString(), base);
run(css);
} else {
engine.source.read(input).then(function (data) {
var base = path.dirname(input);
var source = engine.source.hash(data, base);
engine.templates.get(source).then(function (transformed) {
engine.templates.set(transformed).then(function (output) {
done(null, output); // -- out
});
}, function (error) {
done(error);
});
base = path.dirname(input);
css = engine.source.hash(data, base);
run(css);
});

@@ -190,0 +180,0 @@ }

{
"name": "angular-tpl2js",
"version": "0.0.7",
"version": "0.0.8",
"description": "Convert Angular templates to inline JavaScript",

@@ -21,3 +21,4 @@ "files": [

"gulp-util": "^3.0.7",
"mocha": "^2.4.5"
"mocha": "^2.4.5",
"vinyl": "^1.1.1"
},

@@ -24,0 +25,0 @@ "dependencies": {

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