source:
frontend/node_modules/istanbul-lib-coverage/lib/data-properties.js
| Last change on this file was 9af201e, checked in by , 2 weeks ago | |
|---|---|
|
|
| File size: 283 bytes | |
| Rev | Line | |
|---|---|---|
| [9af201e] | 1 | 'use strict'; |
| 2 | ||
| 3 | module.exports = function dataProperties(klass, properties) { | |
| 4 | properties.forEach(p => { | |
| 5 | Object.defineProperty(klass.prototype, p, { | |
| 6 | enumerable: true, | |
| 7 | get() { | |
| 8 | return this.data[p]; | |
| 9 | } | |
| 10 | }); | |
| 11 | }); | |
| 12 | }; |
Note:
See TracBrowser
for help on using the repository browser.
