1
- /* global exports */
2
1
/* global Buffer */
3
- /* global require */
4
2
"use strict" ;
5
3
6
- exports . showImpl = require ( ' util' ) . inspect ;
4
+ exports . showImpl = require ( " util" ) . inspect ;
7
5
8
- exports . eqImpl = function ( a ) {
9
- return function ( b ) {
6
+ exports . eqImpl = function ( a ) {
7
+ return function ( b ) {
10
8
return a . equals ( b ) ;
11
- }
9
+ } ;
12
10
} ;
13
11
14
- exports . compareImpl = function ( a ) {
12
+ exports . compareImpl = function ( a ) {
15
13
return function ( b ) {
16
14
return a . compare ( b ) ;
17
15
} ;
18
- }
16
+ } ;
19
17
20
18
exports . create = function ( size ) {
21
19
return Buffer . alloc ( size ) ;
@@ -30,15 +28,15 @@ exports.size = function (buff) {
30
28
} ;
31
29
32
30
exports . toArray = function ( buff ) {
33
- var json = buff . toJSON ( )
31
+ var json = buff . toJSON ( ) ;
34
32
return json . data || json ;
35
33
} ;
36
34
37
- exports . toArrayBuffer = function ( buff ) {
35
+ exports . toArrayBuffer = function ( buff ) {
38
36
return buff . buffer . slice ( buff . byteOffset , buff . byteOffset + buff . byteLength ) ;
39
37
} ;
40
38
41
- exports . fromArrayBuffer = function ( ab ) {
39
+ exports . fromArrayBuffer = function ( ab ) {
42
40
return Buffer . from ( ab ) ;
43
41
} ;
44
42
@@ -51,7 +49,7 @@ exports.fromStringImpl = function (str) {
51
49
exports . readImpl = function ( ty ) {
52
50
return function ( offset ) {
53
51
return function ( buf ) {
54
- return buf [ ' read' + ty ] ( offset ) ;
52
+ return buf [ " read" + ty ] ( offset ) ;
55
53
} ;
56
54
} ;
57
55
} ;
@@ -71,8 +69,7 @@ exports.getAtOffsetImpl = function (just) {
71
69
return function ( offset ) {
72
70
return function ( buff ) {
73
71
var octet = buff [ offset ] ;
74
- return octet == null ? nothing
75
- : just ( octet ) ;
72
+ return octet == null ? nothing : just ( octet ) ;
76
73
} ;
77
74
} ;
78
75
} ;
0 commit comments