File tree 2 files changed +33
-2
lines changed 2 files changed +33
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,6 @@ const hasOwnProperty = uncurryThis(Object.prototype.hasOwnProperty);
31
31
const propertyIsEnumerable = uncurryThis ( Object . prototype . propertyIsEnumerable ) ;
32
32
const objectToString = uncurryThis ( Object . prototype . toString ) ;
33
33
34
- const { compare } = require ( 'buffer/' ) . Buffer ;
35
34
const {
36
35
isAnyArrayBuffer,
37
36
isArrayBufferView,
@@ -71,6 +70,39 @@ function getOwnNonIndexProperties(value) {
71
70
) ;
72
71
}
73
72
73
+ // Taken from https://github.com/feross/buffer/blob/680e9e5e488f22aac27599a57dc844a6315928dd/index.js
74
+ // original notice:
75
+ /*!
76
+ * The buffer module from node.js, for the browser.
77
+ *
78
+ * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
79
+ * @license MIT
80
+ */
81
+ function compare ( a , b ) {
82
+ if ( a === b ) {
83
+ return 0 ;
84
+ }
85
+
86
+ var x = a . length ;
87
+ var y = b . length ;
88
+
89
+ for ( var i = 0 , len = Math . min ( x , y ) ; i < len ; ++ i ) {
90
+ if ( a [ i ] !== b [ i ] ) {
91
+ x = a [ i ] ;
92
+ y = b [ i ] ;
93
+ break ;
94
+ }
95
+ }
96
+
97
+ if ( x < y ) {
98
+ return - 1 ;
99
+ }
100
+ if ( y < x ) {
101
+ return 1 ;
102
+ }
103
+ return 0 ;
104
+ }
105
+
74
106
const ONLY_ENUMERABLE = undefined ;
75
107
76
108
const kStrict = true ;
Original file line number Diff line number Diff line change 32
32
"tape" : " ^4.10.1"
33
33
},
34
34
"dependencies" : {
35
- "buffer" : " ^5.2.1" ,
36
35
"es6-object-assign" : " ^1.1.0" ,
37
36
"is-nan" : " ^1.2.1" ,
38
37
"object-is" : " ^1.0.1" ,
You can’t perform that action at this time.
0 commit comments