25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

commonjs-test.js 222B

123456789101112
  1. const assert = require('assert');
  2. const mustache = require('mustache');
  3. const view = {
  4. title: 'Joe',
  5. calc: () => 2 + 4
  6. };
  7. assert.strictEqual(
  8. mustache.render('{{title}} spends {{calc}}', view),
  9. 'Joe spends 6'
  10. );