File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,27 @@ var wshapi = (function() {
14
14
var shell = WScript . CreateObject ( "WScript.Shell" ) ;
15
15
var finalArgs = [ ] , i , args = WScript . Arguments ;
16
16
17
+ if ( typeof Object . getPrototypeOf !== "function" ) {
18
+ Object . getPrototypeOf = function ( obj ) {
19
+ var deprecatedProto = "__proto__" ; // anti warning solution
20
+ return obj [ deprecatedProto ] ;
21
+ } ;
22
+ }
23
+
24
+ if ( typeof Object . create !== "function" ) {
25
+ Object . create = function ( proto ) {
26
+ var Foo = function ( ) { } ;
27
+ Foo . prototype = proto ;
28
+ return new Foo ( ) ;
29
+ } ;
30
+ }
31
+
32
+ if ( typeof String . prototype . trim !== "function" ) {
33
+ String . prototype . trim = function ( ) {
34
+ return this . replace ( / ^ \s + | \s + $ / g, "" ) ;
35
+ } ;
36
+ }
37
+
17
38
if ( typeof Array . prototype . forEach !== "function" ) {
18
39
Array . prototype . forEach = function ( f , m ) {
19
40
for ( var i = 0 , L = this . length ; i < L ; ++ i ) {
You can’t perform that action at this time.
0 commit comments