File: dot_notation.js

package info (click to toggle)
mustache.js 3.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,144 kB
  • sloc: javascript: 1,518; ruby: 61; sh: 17; makefile: 14
file content (24 lines) | stat: -rw-r--r-- 421 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
({
  name: "A Book",
  authors: ["John Power", "Jamie Walsh"],
  price: {
    value: 200,
    vat: function () {
      return this.value * 0.2;
    },
    currency: {
      symbol: '$',
      name: 'USD'
    }
  },
  availability: {
    status: true,
    text: "In Stock"
  },
  // And now, some truthy false values
  truthy: {
    zero: 0,
    notTrue: false
  },
  singletonList: [{singletonItem: "singleton item"}]
})