UNPKG

497 BJavaScriptView Raw
1var hide = require('../lib/hideProperty')
2
3var Book = function Book (data) {
4 hide(data, 'something')
5 this.getTitle2 = function () {
6 return this.title
7 }
8}
9
10Book.prototype.getTitle = function () {
11 return this.title
12}
13
14module.exports = Book
15
16
17
18
19
20// 'use strict';
21// module.exports = class Book {
22// constructor (data) {
23// delete data.something
24// this.getTitle2 = function () {
25// return this.title
26// }
27// }
28// getTitle () {
29// return this.title
30// }
31// }