UNPKG
protofree
Version:
latest (1.0.0)
1.0.0
Disable the __proto__ property for better security
github.com/kanongil/protofree
kanongil/protofree
protofree
/
lib
/
partial.js
19 lines
(13 loc)
•
347 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
'use strict'
;
const
Descriptor
=
require
(
'./desc'
);
module
.
exports
=
function
(
) {
// eslint-disable-next-line no-extend-native
Object
.
defineProperty
(
Object
.
prototype
,
'__proto__'
, {
configurable
:
true
,
enumerable
:
false
,
get
(
) {
return
undefined
; },
set
:
Descriptor
.
set
}); };