1.4.1: Directory Structure Creation
This commit is contained in:
parent
25d622ec58
commit
bed4240acb
360 changed files with 111598 additions and 0 deletions
10
node_modules/css-tree/lib/common/adopt-buffer.js
generated
vendored
Normal file
10
node_modules/css-tree/lib/common/adopt-buffer.js
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
var MIN_SIZE = 16 * 1024;
|
||||
var SafeUint32Array = typeof Uint32Array !== 'undefined' ? Uint32Array : Array; // fallback on Array when TypedArray is not supported
|
||||
|
||||
module.exports = function adoptBuffer(buffer, size) {
|
||||
if (buffer === null || buffer.length < size) {
|
||||
return new SafeUint32Array(Math.max(size + 1024, MIN_SIZE));
|
||||
}
|
||||
|
||||
return buffer;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue