[JSMODELS-13] Register custom formatters for JSObject type Created: 26/Jun/17  Updated: 08/Aug/17  Resolved: 14/Jul/17

Status: Closed
Project: Magnolia Javascript Models
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0

Type: New Feature Priority: Neutral
Reporter: Jaroslav Simak Assignee: Jaroslav Simak
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
depends upon MAGNOLIA-7077 Add tool to get the data structure of... Closed
Template:
Acceptance criteria:
Empty
Sprint: Kromeriz 103, Kromeriz 104, Kromeriz 105
Story Points: 2

 Description   

See MAGNOLIA-7077.

Example usage (cmsfn must be registered as a component in the JS module):

var MyModel = function () {
...
    this.something = function() {
        cmsfn.dump(this);
    }
}

Example output of JS objects:
JavaScript Function:

[object Object] (JavaScript Function)

JavaScript Array:

JavaScript Array (3)
  0 = "a" (String)
  1 = "b" (String)
  2 = "c" (String)

JavaScript Object:

JavaScript Object (4)
  a = "foo" (String)
  b = 11 (Integer)
  c = JavaScript Array (3)
    0 = 1 (Integer)
    1 = 2 (Integer)
    2 = 3 (Integer)
  d = [object Object] (JavaScript Function)

Generated at Mon Feb 12 05:58:47 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.