Socket
Socket
Sign inDemoInstall

edge.js

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

edge.js - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

.nyc_output/44da21f80d3a0fd6ff3620a7ce29c6ae.json

15

CHANGELOG.md

@@ -0,1 +1,16 @@

<a name="1.0.2"></a>
## [1.0.2](https://github.com/poppinss/edge/compare/v1.0.1...v1.0.2) (2017-08-08)
### Bug Fixes
* **context:** bind context to global functions ([e0a2685](https://github.com/poppinss/edge/commit/e0a2685))
### Features
* **globals:** add elIf ([fb522ce](https://github.com/poppinss/edge/commit/fb522ce))
<a name="1.0.1"></a>

@@ -2,0 +17,0 @@ ## [1.0.1](https://github.com/poppinss/edge/compare/v1.0.0...v1.0.1) (2017-06-21)

2

package.json
{
"name": "edge.js",
"version": "1.0.1",
"version": "1.0.2",
"description": "Node.js logical templating engine with fresh air",

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

@@ -155,2 +155,3 @@ 'use strict'

value = _.get(this.$globals, key)
value = typeof (value) === 'function' ? value.bind(this) : value
}

@@ -157,0 +158,0 @@

@@ -143,3 +143,3 @@ 'use strict'

return this.safe(htmlStr.replace(/\$([\w.-]+)/g, (match, group) => {
return _.get(hash, _.toPath(group))
return group === 'self' ? hash : _.get(hash, _.toPath(group))
}))

@@ -149,2 +149,24 @@ }

/**
* Return element only when the 3rd param
* is true.
*
* @method elIf
*
* @param {String} htmlStr
* @param {Object} hash
* @param {Boolean} ifResult
*
* @return {String}
*/
const elIf = function (htmlStr, hash, ifResult) {
if (!ifResult) {
return ''
}
return this.safe(htmlStr.replace(/\$([\w.-]+)/g, (match, group) => {
return group === 'self' ? hash : _.get(hash, _.toPath(group))
}))
}
/**
* Convert a string to camelcase

@@ -281,2 +303,3 @@ *

el,
elIf,
camelCase,

@@ -283,0 +306,0 @@ upperCase,

Sorry, the diff of this file is not supported yet

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