Skip to content
Permalink
Browse files

freelist: simplify export

PR-URL: #12644
Reviewed-By: Brian White <mscdex@mscdex.net>
  • Loading branch information...
jasnell committed Apr 25, 2017
1 parent 08809f2 commit ea9eed56433c714b08930b906b292a21650b3928
@@ -25,7 +25,7 @@ const binding = process.binding('http_parser');
const methods = binding.methods;
const HTTPParser = binding.HTTPParser;

const FreeList = require('internal/freelist').FreeList;
const FreeList = require('internal/freelist');
const ondrain = require('internal/http').ondrain;
const incoming = require('_http_incoming');
const IncomingMessage = incoming.IncomingMessage;
@@ -22,4 +22,4 @@ class FreeList {
}
}

module.exports = {FreeList};
module.exports = FreeList;
@@ -4,12 +4,11 @@

require('../common');
const assert = require('assert');
const freelist = require('internal/freelist');
const FreeList = require('internal/freelist');

assert.strictEqual(typeof freelist, 'object');
assert.strictEqual(typeof freelist.FreeList, 'function');
assert.strictEqual(typeof FreeList, 'function');

const flist1 = new freelist.FreeList('flist1', 3, String);
const flist1 = new FreeList('flist1', 3, String);

// Allocating when empty, should not change the list size
const result = flist1.alloc('test');
@@ -7,5 +7,5 @@ const config = process.binding('config');

console.log(config, process.argv);

assert.strictEqual(typeof require('internal/freelist').FreeList, 'function');
assert.strictEqual(typeof require('internal/freelist'), 'function');
assert.strictEqual(config.exposeInternals, true);

0 comments on commit ea9eed5

Please sign in to comment.
You can’t perform that action at this time.