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

grunt-ejs-static

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-ejs-static - npm Package Compare versions

Comparing version 0.3.8 to 0.3.9

2

package.json
{
"name": "grunt-ejs-static",
"description": "Compile static html from ejs templates",
"version": "0.3.8",
"version": "0.3.9",
"homepage": "https://github.com/shaekuronen/grunt-ejs-static",

@@ -6,0 +6,0 @@ "author": {

@@ -289,3 +289,3 @@ # grunt-ejs-static

Helper functions can be defined in 3 ways. If a string, indicates the path to a single file containing one or more helper functions. An array indicates multiple paths to files containing one or more helper functions. An object defines one or more helper functions inline (in the Gruntfile). The key is the function name and the value is the function.
Helper functions can be defined in 3 ways. If a string, indicates the path to a single file containing one or more helper functions. An array indicates multiple paths to files containing one or more helper functions. An object defines one or more helper functions inline (in the Gruntfile). The key is the function name and the value is the function expression.

@@ -315,21 +315,2 @@ ```javascript

},
build_url: function(scheme, hostname, path, queries) {
console.log('this hnappen ' + queries);
var url = "";
url += scheme;
url += "://";
url += hostname;
url += path;
if (queries.length > 0) {
url += "?";
queries.forEach(function(query, index) {
if (index === 0) {
url += query;
} else {
url += "&" + query;
}
});
}
return url;
},
print_object: function(obj) {

@@ -360,3 +341,49 @@ var output = '';

```
If included as a file, needs to be wrapped w/ module.exports
```javascript
module.exports = exports = {
build_url: function(scheme, hostname, path, queries) {
console.log('this hnappen ' + queries);
var url = "";
url += scheme;
url += "://";
url += hostname;
url += path;
if (queries.length > 0) {
url += "?";
queries.forEach(function(query, index) {
if (index === 0) {
url += query;
} else {
url += "&" + query;
}
});
}
return url;
},
print_object: function(obj) {
var output = '';
for(var property in obj) {
output += property + ': ' + obj[property]+'; \n';
}
console.log(output);
},
highlight: function(text) {
return "<h1 style='color:red;'>" + text + "</h1>";
}
};
```
which can then be used in a template like this
```ejs
<%- highlight('This Text') -%>
<%= build_url("https", "www.google.com", "/search", ['q=unicorns', 'oq=unicorns']) %>
<% print_object(this); %>
```
#### options.underscore

@@ -363,0 +390,0 @@ Optional

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