1.14.0 • Published 2 years ago

@totemstan/skin v1.14.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

SKIN

SKIN provides a:

renderSkin(req,res)

endpoint to render DEBE notebooks, datasets, and engines using the (possibly dynamically generated) jade associated with the requested notebook/table/engine.

Manage

npm install @totemstan/skin		# Install
npm run start [ ? | $ | ...]	# Unit test
npm run verminor				# Roll minor version
npm run vermajor				# Roll major version
npm run redoc					# Regen documentation

Usage

Acquire and optionally configure SKIN:

const SKIN = require("skin").config({
	key: value, 						// set key
	"key.key": value, 					// indexed set
	"key.key.": value					// indexed append
});

where configuration keys follow ENUMS deep copy conventions

Program Reference

SKIN

Provides an endpoint to render DEBE notebooks, datasets, and engines using the (possibly dynamically generated) jade associated with the requested notebook/table/engine. This module documented in accordance with jsdoc.

Requires: module:enums, module:fs, module:cluster, module:jade@1.9.0
Author: ACMESDS

SKIN.skinContext(req, cb)

Callback cb with skinning context ctx for requested table.

Kind: static method of SKIN

ParamTypeDescription
reqObjectTotem request
cbfunctioncallback(ctx)

SKIN.renderJade(jade, ctx, cb)

Render jade string to callback cb( err || html ) in a new context created for this request.

Kind: static method of SKIN

ParamTypeDescription
jadeStringcontents to render
ctxObjectskinning context
cbfunctioncallback(ctx)

SKIN.renderSkin(req, res)

Endpoint to render req.table using associated jade engine.

Kind: static method of SKIN

ParamTypeDescription
reqObjectTotem request
resfunctionTotem response

Contacting, Contributing, Following

Feel free to

License

MIT


© 2012 ACMESDS