main
Last change
on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
854 bytes
|
Rev | Line | |
---|
[79a0317] | 1 | // Generated by CoffeeScript 1.12.7
|
---|
| 2 | var domToMarkup, object, objectToSaneObject, saneObjectToDom, self;
|
---|
| 3 |
|
---|
| 4 | objectToSaneObject = require('./objectToSaneObject');
|
---|
| 5 |
|
---|
| 6 | saneObjectToDom = require('./saneObjectToDom');
|
---|
| 7 |
|
---|
| 8 | domToMarkup = require('./domToMarkup');
|
---|
| 9 |
|
---|
| 10 | object = require('utila').object;
|
---|
| 11 |
|
---|
| 12 | module.exports = self = {
|
---|
| 13 | objectToDom: function(o) {
|
---|
| 14 | o = self._object2SaneObject(o);
|
---|
| 15 | return saneObjectToDom.convert(o);
|
---|
| 16 | },
|
---|
| 17 | object2markup: function(o) {
|
---|
| 18 | var dom;
|
---|
| 19 | dom = self.objectToDom(o);
|
---|
| 20 | return domToMarkup.convert(dom);
|
---|
| 21 | },
|
---|
| 22 | domToMarkup: function(dom) {
|
---|
| 23 | return domToMarkup.convert(dom);
|
---|
| 24 | },
|
---|
| 25 | _object2SaneObject: function(o) {
|
---|
| 26 | if (!Array.isArray(o)) {
|
---|
| 27 | if (!object.isBareObject(o)) {
|
---|
| 28 | throw Error("toDom() only accepts arrays and bare objects as input");
|
---|
| 29 | }
|
---|
| 30 | }
|
---|
| 31 | return objectToSaneObject.sanitize(o);
|
---|
| 32 | }
|
---|
| 33 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.