-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6a0a622
commit a5657ea
Showing
19 changed files
with
5,887 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,19 @@ | ||
"use strict"; | ||
'use strict'; | ||
|
||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.registerHelper = registerHelper; | ||
exports.resolveNested = resolveNested; | ||
exports.resolveNested = exports.registerHelper = undefined; | ||
|
||
var _deps = require("../deps"); | ||
var _registerHelper = require('./registerHelper'); | ||
|
||
var _deps2 = _interopRequireDefault(_deps); | ||
var _registerHelper2 = _interopRequireDefault(_registerHelper); | ||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
|
||
function registerHelper(name, fn, inverse) { | ||
var nestedFn = function nestedFn() { | ||
var nestedArguments = []; | ||
|
||
for (var index = 0; index < arguments.length; index++) { | ||
var argument = arguments[index]; | ||
|
||
if (argument && argument.hash) { | ||
for (var key in argument.hash) { | ||
argument.hash[key] = resolveNested.apply(this, [argument.hash[key]]); | ||
} | ||
var _resolveNested = require('./resolveNested'); | ||
|
||
nestedArguments.push(argument); | ||
} else { | ||
nestedArguments.push(resolveNested.apply(this, [argument])); | ||
} | ||
} | ||
var _resolveNested2 = _interopRequireDefault(_resolveNested); | ||
|
||
return fn.apply(this, nestedArguments); | ||
}; | ||
|
||
_deps2.default.Handlebars._registerHelper.apply(this, [name, nestedFn, inverse]); | ||
}; | ||
|
||
function resolveNested(value) { | ||
if ((0, _deps.getUtils)().isString(value) && value.indexOf('{{') >= 0) { | ||
value = _deps2.default.Handlebars.compile(value)(this); | ||
} | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
|
||
return value; | ||
}; | ||
exports.registerHelper = _registerHelper2.default; | ||
exports.resolveNested = _resolveNested2.default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
"use strict"; | ||
|
||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = registerHelper; | ||
function registerHelper(name, fn, inverse) { | ||
var Handlebars = this; | ||
|
||
var nestedFn = function nestedFn() { | ||
var nestedArguments = []; | ||
|
||
for (var index = 0; index < arguments.length; index++) { | ||
var argument = arguments[index]; | ||
|
||
if (argument && argument.hash) { | ||
for (var key in argument.hash) { | ||
argument.hash[key] = Handlebars.resolveNested(argument.hash[key], this); | ||
} | ||
|
||
nestedArguments.push(argument); | ||
} else { | ||
nestedArguments.push(Handlebars.resolveNested(argument, this)); | ||
} | ||
} | ||
|
||
return fn.apply(this, nestedArguments); | ||
}; | ||
|
||
this._registerHelper.apply(this, [name, nestedFn, inverse]); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
'use strict'; | ||
|
||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = resolveNested; | ||
function resolveNested(value, context) { | ||
if (this.Utils.isString(value) && value.indexOf('{{') >= 0) { | ||
value = this.compile(value)(context); | ||
} | ||
|
||
return value; | ||
}; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.