author | ymh <ymh.work@gmail.com> |
Wed, 13 Sep 2017 22:19:48 +0200 | |
changeset 544 | ad58d7627f70 |
parent 467 | 762fc0eb4946 |
permissions | -rw-r--r-- |
import Ember from 'ember'; export function annotationContent(params/*, hash*/) { if(!params || (params.length === 0)) { return ""; } let content = params[0]; if(typeof content === "string") { return content; } else if(typeof content === "object") { let res = `[ ${content.ctype}`; for(let k in content) { if(k !== 'ctype') { res += `, ${k}: ${content[k]}`; } } return res + " ]"; } else { return content; } } export default Ember.Helper.helper(annotationContent);