Giter Site home page Giter Site logo

kingsquare / communibase-template-data-factory Goto Github PK

View Code? Open in Web Editor NEW
1.0 7.0 2.0 354 KB

A collection of helper functions to simplify the use of Communibase data in Templates.

License: GNU General Public License v2.0

JavaScript 97.67% HTML 2.33%
communibase-data

communibase-template-data-factory's Introduction

communibase-template-data-factory

Enrich Communibase-data in any way possible for easy use in dynamic templates.

var Factory = require('communibase-template-data-factory');
// other deps

var factory = new Factory({ ... your options ...});
factory.getPromise("Person", person).then(function () { ... })

Constructor options

All options for the constructor are optional. Possible options:

cbc: an instance of the Communibase Connector. Will be spawned if not supplied stxt: a Javascript-object containing optional translations, e.g.:

{
    "Address.countryCode.NL": "Nederland",
    "Person.firstName": "Voornaam" 
 }

Extra serializers

Extra (custom) serializers can be added to the factory using the addSerializers-method. See serializers in the entityType-folder for examples and implementations

Debugging?

See runTest.js line 44, attach a debugger from the IDE to mocha

PLEASE NOTE

This library is compatible with Handlebars 2.0.0

Later versions of Handlebars have a different AST and do not function properly!

communibase-template-data-factory's People

Contributors

aubreyhewes avatar davidrip avatar fruitl00p avatar reggino avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

communibase-template-data-factory's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.