UNPKG
pxnpminstall
Version:
beta (2.0.1-beta.0)
latest (3.0.1)
3.0.1
3.0.0
3.0.0-0
2.0.2
2.0.1
2.0.1-beta.0
2.0.0
1.0.5
1.0.4
1.0.3
1.0.2
1.0.2-beta.0
1.0.1
1.0.0
1.0.0-beta.1
1.0.0-beta.0
0.0.10
0.0.9
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
Make npm install fast and handy.
github.com/cnpm/npminstall
cnpm/npminstall
pxnpminstall
/
lib
/
patch_buffer.js
13 lines
(10 loc)
•
287 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
'use strict'
;
// make sure buffer.alloc exists on 4.2.3 <= Node.js < 4.5.0
// it use on tar@^4.0.0
if
(
typeof
Buffer
.
alloc
===
'undefined'
) {
Buffer
.
alloc
=
function
alloc
(
size, fill, encoding
) {
const
buf =
new
Buffer
(size); buf.
fill
(fill, encoding);
return
buf; }; }