1.0.16 • Published 6 years ago

dot-mustache v1.0.16

Weekly downloads
19
License
MIT
Repository
-
Last release
6 years ago

DotMustache

Allows you to access arrays and objects via dot notation.

const {parser} = require('dot-mustache');
parser('body.text.crit.[words,something.here]', {
  body: {
    text: [{
      crit: {
        words: ['This works', 'This too'],
        something: {
          here: 'here this works',
        },
      },
    }, {
      crit: [{
        words: 'still works',
        something: {
          here: 'here this works too',
        },
      }],
    }],
  },
});

This code snippet returns

[{
  'words': ['This works', 'This too'],
  'something.here': 'here this works'
} {
  'words': 'still works',
  'something.here': 'here this works too'
}]
1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago