Sorry, the diff of this file is not supported yet
| language: node_js | ||
| node_js: | ||
| - "0.10" | ||
| - "0.12" | ||
| - "4" | ||
| - "6" | ||
| - "7" | ||
| after_script: | ||
| - coveralls < coverage/lcov.info |
+21
| { | ||
| "name": "dot", | ||
| "description": "Concise and fast javascript templating compatible with nodejs and other javascript environments", | ||
| "main": "index.js", | ||
| "authors": [ | ||
| "Laura Doktorova <ldoktorova@gmail.com>" | ||
| ], | ||
| "license": "MIT", | ||
| "keywords": [ | ||
| "template", | ||
| "fast", | ||
| "simple", | ||
| "templating" | ||
| ], | ||
| "homepage": "https://github.com/olado/doT", | ||
| "ignore": [ | ||
| "node_modules", | ||
| "bower_components", | ||
| "test" | ||
| ] | ||
| } |
+2
-1
@@ -27,3 +27,4 @@ // doT.js | ||
| template: undefined, //fn, compile template | ||
| compile: undefined //fn, for express | ||
| compile: undefined, //fn, for express | ||
| log: true | ||
| }, _globals; | ||
@@ -30,0 +31,0 @@ |
@@ -119,2 +119,18 @@ Advanced templating: illustrates defines and includes. | ||
| {{##def.testFunctionWithParam = function(str) { | ||
| return "My name is: " + str; | ||
| } | ||
| #}} | ||
| {{##def.mytestparam: {{=it.name}} #}} | ||
| {{#def.testFunctionWithParam(def.mytestparam)}} | ||
| {{#def.testFunctionWithParam("\{\{=it.name\}\}")}} | ||
| {{##def.testParamDef:myparam: | ||
| My name is: {{=myparam}} | ||
| #}} | ||
| {{#def.testParamDef:it.name}} | ||
| The end |
| (function() { | ||
| var doT = require('../doT.js'), | ||
| fs = require('fs'), | ||
| data = { f1: 1, f2: 2, f3: 3, altEmail: "conditional works", farray:[{farray:[1,2,3,[11,22,33]],person:{name:'Ell',age:23}},{farray:{how:'really'}}, {farray:[5,6,7,8]}]}, | ||
| data = { name: "Foo", f1: 1, f2: 2, f3: 3, altEmail: "conditional works", farray:[{farray:[1,2,3,[11,22,33]],person:{name:'Ell',age:23}},{farray:{how:'really'}}, {farray:[5,6,7,8]}]}, | ||
| defs = { a: 100, b: 200}; | ||
@@ -6,0 +6,0 @@ |
+4
-4
@@ -116,3 +116,3 @@ /* doT + auto-compilation of doT templates | ||
| InstallDots.prototype.compileAll = function() { | ||
| console.log("Compiling all doT templates..."); | ||
| if (doT.log) console.log("Compiling all doT templates..."); | ||
@@ -126,3 +126,3 @@ var defFolder = this.__path, | ||
| if (/\.def(\.dot|\.jst)?$/.test(name)) { | ||
| console.log("Loaded def " + name); | ||
| if (doT.log) console.log("Loaded def " + name); | ||
| this.__includes[name.substring(0, name.indexOf('.'))] = readdata(defFolder + name); | ||
@@ -135,7 +135,7 @@ } | ||
| if (/\.dot(\.def|\.jst)?$/.test(name)) { | ||
| console.log("Compiling " + name + " to function"); | ||
| if (doT.log) console.log("Compiling " + name + " to function"); | ||
| this.__rendermodule[name.substring(0, name.indexOf('.'))] = this.compilePath(defFolder + name); | ||
| } | ||
| if (/\.jst(\.dot|\.def)?$/.test(name)) { | ||
| console.log("Compiling " + name + " to file"); | ||
| if (doT.log) console.log("Compiling " + name + " to file"); | ||
| this.compileToFile(this.__destination + name.substring(0, name.indexOf('.')) + '.js', | ||
@@ -142,0 +142,0 @@ readdata(defFolder + name)); |
+20
-7
@@ -10,3 +10,3 @@ { | ||
| ], | ||
| "version": "1.0.3", | ||
| "version": "1.1.0", | ||
| "main": "index", | ||
@@ -22,14 +22,27 @@ "bin": { | ||
| ], | ||
| "license": "MIT", | ||
| "scripts": { | ||
| "test": "mocha" | ||
| "test": "nyc mocha" | ||
| }, | ||
| "dependencies": { | ||
| }, | ||
| "dependencies": {}, | ||
| "devDependencies": { | ||
| "commander": "*", | ||
| "uglify-js": "*", | ||
| "coveralls": "^2.11.14", | ||
| "jshint": "*", | ||
| "mkdirp": "*", | ||
| "mocha":"*", | ||
| "jshint":"*" | ||
| "mocha": "*", | ||
| "nyc": "^8.3.2", | ||
| "pre-commit": "^1.1.3", | ||
| "uglify-js": "*" | ||
| }, | ||
| "nyc": { | ||
| "exclude": [ | ||
| "test", | ||
| "node_modules" | ||
| ], | ||
| "reporter": [ | ||
| "lcov", | ||
| "text-summary" | ||
| ] | ||
| } | ||
| } |
+9
-4
@@ -0,1 +1,3 @@ | ||
| # doT | ||
| Created in search of the fastest and concise JavaScript templating function with emphasis on performance under V8 and nodejs. It shows great performance for both nodejs and browsers. | ||
@@ -5,2 +7,7 @@ | ||
| [](https://travis-ci.org/olado/doT) | ||
| [](https://www.npmjs.com/package/dot) | ||
| [](https://coveralls.io/github/olado/doT?branch=master) | ||
| ## Features | ||
@@ -75,3 +82,3 @@ custom delimiters | ||
| ## Author | ||
| Laura Doktorova @olado | ||
| Laura Doktorova [@olado](http://twitter.com/olado) | ||
@@ -85,4 +92,2 @@ ## License | ||
| Thank you Kevin Kirchner for the logo. | ||
| Thank you [@KevinKirchner](https://twitter.com/kevinkirchner) for the logo. |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
65056
3.46%33
10%1406
1.59%91
5.81%8
60%13
8.33%