Comparing version 0.0.12 to 0.0.13
@@ -6,2 +6,3 @@ import { Either } from "fp-ts/lib/Either"; | ||
} | ||
export declare function render(view: any, options?: ThymeleafRenderOptions): (model: any) => Either<Error, string>; | ||
export declare function render<A>(view: any, model?: A, options?: ThymeleafRenderOptions): Either<Error, string>; | ||
export declare function getRenderer(view: any, options?: ThymeleafRenderOptions): <A>(model: A) => Either<Error, string>; |
import { tryCatch } from "fp-ts/lib/Either"; | ||
var thymeleaf = __non_webpack_require__('/lib/thymeleaf'); | ||
export function render(view, options) { | ||
return function (model) { return tryCatch(function () { return thymeleaf.render(view, model, options); }, function (e) { return ({ errorKey: "InternalServerError", cause: String(e) }); }); }; | ||
export function render(view, model, options) { | ||
return tryCatch(function () { return thymeleaf.render(view, model, options); }, function (e) { return ({ errorKey: "InternalServerError", cause: String(e) }); }); | ||
} | ||
export function getRenderer(view, options) { | ||
return function (model) { return render(view, model, options); }; | ||
} |
@@ -6,2 +6,3 @@ import { Either } from "fp-ts/lib/Either"; | ||
} | ||
export declare function render(view: any, options?: ThymeleafRenderOptions): (model: any) => Either<Error, string>; | ||
export declare function render<A>(view: any, model?: A, options?: ThymeleafRenderOptions): Either<Error, string>; | ||
export declare function getRenderer(view: any, options?: ThymeleafRenderOptions): <A>(model: A) => Either<Error, string>; |
@@ -5,5 +5,9 @@ "use strict"; | ||
var thymeleaf = __non_webpack_require__('/lib/thymeleaf'); | ||
function render(view, options) { | ||
return function (model) { return Either_1.tryCatch(function () { return thymeleaf.render(view, model, options); }, function (e) { return ({ errorKey: "InternalServerError", cause: String(e) }); }); }; | ||
function render(view, model, options) { | ||
return Either_1.tryCatch(function () { return thymeleaf.render(view, model, options); }, function (e) { return ({ errorKey: "InternalServerError", cause: String(e) }); }); | ||
} | ||
exports.render = render; | ||
function getRenderer(view, options) { | ||
return function (model) { return render(view, model, options); }; | ||
} | ||
exports.getRenderer = getRenderer; |
{ | ||
"name": "enonic-fp", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"description": "Functional programming helpers for Enonic XP", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56606
1458