vcard-generator
Version:
VCard v4.0 rfc6350 compliant generator from JSON.
30 lines (21 loc) • 823 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _util = require('./util');
exports.default = function (_ref) {
var pref = _ref.pref,
type = _ref.type,
text = _ref.text,
value = _ref.value;
return ['ORG', (0, _util.formatPref)(pref), (0, _util.formatType)(type), ':', (0, _util.encodeTextList)(text || value, ';')].filter(_util.isSet).join('');
}; /*
Cardinality: 0+ (*)
ORG-param = "VALUE=text" / sort-as-param / language-param
/ pid-param / pref-param / altid-param / type-param
/ any-param
ORG-value = component *(";" component)
Example: A property value consisting of an organizational name,
organizational unit #1 name, and organizational unit #2 name.
ORG:ABC\, Inc.;North American Division;Marketing
*/