File tree Expand file tree Collapse file tree 2 files changed +33
-2
lines changed
Expand file tree Collapse file tree 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);
3131const propertyIsEnumerable = uncurryThis ( Object . prototype . propertyIsEnumerable ) ;
3232const objectToString = uncurryThis ( Object . prototype . toString ) ;
3333
34- const { compare } = require ( 'buffer/' ) . Buffer ;
3534const {
3635 isAnyArrayBuffer,
3736 isArrayBufferView,
@@ -71,6 +70,39 @@ function getOwnNonIndexProperties(value) {
7170 ) ;
7271}
7372
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+
74106const ONLY_ENUMERABLE = undefined ;
75107
76108const kStrict = true ;
Original file line number Diff line number Diff line change 3232 "tape" : " ^4.10.1"
3333 },
3434 "dependencies" : {
35- "buffer" : " ^5.2.1" ,
3635 "es6-object-assign" : " ^1.1.0" ,
3736 "is-nan" : " ^1.2.1" ,
3837 "object-is" : " ^1.0.1" ,
You can’t perform that action at this time.
0 commit comments