UNPKG

gpreview

Version:

Preview Ghost themes locally without a full Ghost installation

30 lines 977 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isHelper = isHelper; function isHelper(context, options) { const checkContext = (ctx) => { switch (ctx) { case 'home': return this.is_home; case 'post': return this.is_post; case 'page': return this.is_page; case 'tag': return this.is_tag; case 'author': return this.is_author; case 'paged': return this.pagination && this.pagination.page > 1; case 'private': return this.is_private; case 'index': return this.is_home || this.is_tag || this.is_author; default: return false; } }; const result = checkContext(context); return result ? options.fn(this) : options.inverse(this); } //# sourceMappingURL=is.js.map