Files: 65191f9a9664f013ebe726bb95a1a54b086e1bd5 / test / test-79-npm / extender / extender.js
313 bytesRaw
1 | ; |
2 | |
3 | var extender = require('extender'); |
4 | |
5 | var e = extender.define({ |
6 | multiply: function (str, times) { |
7 | var ret = str; |
8 | for (var i = 1; i < times; i += 1) { |
9 | ret += str; |
10 | } |
11 | return ret; |
12 | } |
13 | }); |
14 | |
15 | var v = e('hello').multiply(2).value(); |
16 | |
17 | if (v === 'hellohello') { |
18 | console.log('ok'); |
19 | } |
20 |
Built with git-ssb-web