@@ -580,7 +580,7 @@ extend(EdgeCollection.prototype, {
580580 return promise ;
581581 }
582582} ) ;
583- } , { "./cursor" :4 , "extend" :47 , "util" :46 } ] , 3 :[ function ( require , module , exports ) {
583+ } , { "./cursor" :4 , "extend" :48 , "util" :47 } ] , 3 :[ function ( require , module , exports ) {
584584( function ( Buffer ) {
585585'use strict' ;
586586var promisify = require ( './util/promisify' ) ;
@@ -679,7 +679,7 @@ extend(Connection.prototype, {
679679 }
680680} ) ;
681681} ) . call ( this , require ( "buffer" ) . Buffer )
682- } , { "./error" :6 , "./route" :8 , "./util/promisify" :11 , "./util/request" :12 , "buffer" :14 , "extend" :47 , "querystring" :30 } ] , 4 :[ function ( require , module , exports ) {
682+ } , { "./error" :6 , "./route" :8 , "./util/promisify" :11 , "./util/request" :12 , "buffer" :14 , "extend" :48 , "querystring" :31 } ] , 4 :[ function ( require , module , exports ) {
683683'use strict' ;
684684var extend = require ( 'extend' ) ;
685685
@@ -914,7 +914,7 @@ extend(ArrayCursor.prototype, {
914914 return this ;
915915 }
916916} ) ;
917- } , { "extend" :47 } ] , 5 :[ function ( require , module , exports ) {
917+ } , { "extend" :48 } ] , 5 :[ function ( require , module , exports ) {
918918'use strict' ;
919919var extend = require ( 'extend' ) ;
920920var Connection = require ( './connection' ) ;
@@ -1368,7 +1368,7 @@ extend(Database.prototype, {
13681368 return promise ;
13691369 }
13701370} ) ;
1371- } , { "./collection" :2 , "./connection" :3 , "./cursor" :4 , "./error" :6 , "./graph" :7 , "./util/all" :9 , "extend" :47 } ] , 6 :[ function ( require , module , exports ) {
1371+ } , { "./collection" :2 , "./connection" :3 , "./cursor" :4 , "./error" :6 , "./graph" :7 , "./util/all" :9 , "extend" :48 } ] , 6 :[ function ( require , module , exports ) {
13721372'use strict' ;
13731373var inherits = require ( 'util' ) . inherits ;
13741374
@@ -1390,7 +1390,7 @@ function ArangoError(obj) {
13901390
13911391inherits ( ArangoError , Error ) ;
13921392ArangoError . prototype . name = 'ArangoError' ;
1393- } , { "util" :46 } ] , 7 :[ function ( require , module , exports ) {
1393+ } , { "util" :47 } ] , 7 :[ function ( require , module , exports ) {
13941394'use strict' ;
13951395var extend = require ( 'extend' ) ;
13961396var inherits = require ( 'util' ) . inherits ;
@@ -1610,7 +1610,7 @@ extend(EdgeCollection.prototype, {
16101610 return promise ;
16111611 }
16121612} ) ;
1613- } , { "./collection" :2 , "extend" :47 , "util" :46 } ] , 8 :[ function ( require , module , exports ) {
1613+ } , { "./collection" :2 , "extend" :48 , "util" :47 } ] , 8 :[ function ( require , module , exports ) {
16141614'use strict' ;
16151615var extend = require ( 'extend' ) ;
16161616
@@ -1754,7 +1754,7 @@ extend(Route.prototype, {
17541754 } , callback ) ;
17551755 }
17561756} ) ;
1757- } , { "extend" :47 } ] , 9 :[ function ( require , module , exports ) {
1757+ } , { "extend" :48 } ] , 9 :[ function ( require , module , exports ) {
17581758'use strict' ;
17591759module . exports = function all ( arr , callback ) {
17601760 var result = [ ] ;
@@ -1826,6 +1826,7 @@ module.exports = function (PromiseCtor) {
18261826} , { } ] , 12 :[ function ( require , module , exports ) {
18271827'use strict' ;
18281828var http = require ( 'http' ) ;
1829+ var https = require ( 'https' ) ;
18291830var parseUrl = require ( 'url' ) . parse ;
18301831var once = require ( './once' ) ;
18311832var joinPath = require ( 'path' ) . join ;
@@ -1842,12 +1843,16 @@ function rawCopy(obj) {
18421843}
18431844
18441845module . exports = function ( baseUrl , agent , agentOptions ) {
1845- if ( ! agent && http . Agent ) agent = new http . Agent ( agentOptions ) ; // server only
1846+ var baseUrlParts = rawCopy ( parseUrl ( baseUrl ) ) ;
1847+ var isSsl = baseUrlParts . protocol === 'https:' ;
1848+
1849+ if ( ! agent ) {
1850+ agent = new ( isSsl ? https : http ) . Agent ( agentOptions ) ;
1851+ }
18461852
18471853 var queue = new LinkedList ( ) ;
18481854 var maxTasks = typeof agent . maxSockets === 'number' ? agent . maxSockets * 2 : Infinity ;
18491855 var activeTasks = 0 ;
1850- var baseUrlParts = rawCopy ( parseUrl ( baseUrl ) ) ;
18511856
18521857 function drainQueue ( ) {
18531858 if ( ! queue . length || activeTasks >= maxTasks ) return ;
@@ -1878,7 +1883,7 @@ module.exports = function (baseUrl, agent, agentOptions) {
18781883 next ( ) ;
18791884 cb . apply ( this , arguments ) ;
18801885 } ) ;
1881- var req = http . request ( options , function ( res ) {
1886+ var req = ( isSsl ? https : http ) . request ( options , function ( res ) {
18821887 var data = [ ] ;
18831888 res . on ( 'data' , function ( b ) {
18841889 data . push ( b ) ;
@@ -1898,7 +1903,7 @@ module.exports = function (baseUrl, agent, agentOptions) {
18981903 drainQueue ( ) ;
18991904 } ;
19001905} ;
1901- } , { "./once" :10 , "http" :19 , "linkedlist" :48 , "path" :25 , "url" :44 } ] , 13 :[ function ( require , module , exports ) {
1906+ } , { "./once" :10 , "http" :19 , "https" : 23 , " linkedlist" :49 , "path" :26 , "url" :45 } ] , 13 :[ function ( require , module , exports ) {
19021907
19031908} , { } ] , 14 :[ function ( require , module , exports ) {
19041909/*!
@@ -4012,7 +4017,7 @@ http.STATUS_CODES = {
40124017 510 : 'Not Extended' , // RFC 2774
40134018 511 : 'Network Authentication Required' // RFC 6585
40144019} ;
4015- } , { "./lib/request" :20 , "events" :18 , "url" :44 } ] , 20 :[ function ( require , module , exports ) {
4020+ } , { "./lib/request" :20 , "events" :18 , "url" :45 } ] , 20 :[ function ( require , module , exports ) {
40164021var Stream = require ( 'stream' ) ;
40174022var Response = require ( './response' ) ;
40184023var Base64 = require ( 'Base64' ) ;
@@ -4223,7 +4228,7 @@ var isXHR2Compatible = function (obj) {
42234228 if ( typeof FormData !== 'undefined' && obj instanceof FormData ) return true ;
42244229} ;
42254230
4226- } , { "./response" :21 , "Base64" :22 , "inherits" :23 , "stream" :42 } ] , 21 :[ function ( require , module , exports ) {
4231+ } , { "./response" :21 , "Base64" :22 , "inherits" :24 , "stream" :43 } ] , 21 :[ function ( require , module , exports ) {
42274232var Stream = require ( 'stream' ) ;
42284233var util = require ( 'util' ) ;
42294234
@@ -4345,7 +4350,7 @@ var isArray = Array.isArray || function (xs) {
43454350 return Object . prototype . toString . call ( xs ) === '[object Array]' ;
43464351} ;
43474352
4348- } , { "stream" :42 , "util" :46 } ] , 22 :[ function ( require , module , exports ) {
4353+ } , { "stream" :43 , "util" :47 } ] , 22 :[ function ( require , module , exports ) {
43494354; ( function ( ) {
43504355
43514356 var object = typeof exports != 'undefined' ? exports : this ; // #8: web workers
@@ -4408,6 +4413,21 @@ var isArray = Array.isArray || function (xs) {
44084413} ( ) ) ;
44094414
44104415} , { } ] , 23 :[ function ( require , module , exports ) {
4416+ var http = require ( 'http' ) ;
4417+
4418+ var https = module . exports ;
4419+
4420+ for ( var key in http ) {
4421+ if ( http . hasOwnProperty ( key ) ) https [ key ] = http [ key ] ;
4422+ } ;
4423+
4424+ https . request = function ( params , cb ) {
4425+ if ( ! params ) params = { } ;
4426+ params . scheme = 'https' ;
4427+ return http . request . call ( this , params , cb ) ;
4428+ }
4429+
4430+ } , { "http" :19 } ] , 24 :[ function ( require , module , exports ) {
44114431if ( typeof Object . create === 'function' ) {
44124432 // implementation from standard node.js 'util' module
44134433 module . exports = function inherits ( ctor , superCtor ) {
@@ -4432,12 +4452,12 @@ if (typeof Object.create === 'function') {
44324452 }
44334453}
44344454
4435- } , { } ] , 24 :[ function ( require , module , exports ) {
4455+ } , { } ] , 25 :[ function ( require , module , exports ) {
44364456module . exports = Array . isArray || function ( arr ) {
44374457 return Object . prototype . toString . call ( arr ) == '[object Array]' ;
44384458} ;
44394459
4440- } , { } ] , 25 :[ function ( require , module , exports ) {
4460+ } , { } ] , 26 :[ function ( require , module , exports ) {
44414461( function ( process ) {
44424462// Copyright Joyent, Inc. and other Node contributors.
44434463//
@@ -4665,7 +4685,7 @@ var substr = 'ab'.substr(-1) === 'b'
46654685;
46664686
46674687} ) . call ( this , require ( '_process' ) )
4668- } , { "_process" :26 } ] , 26 :[ function ( require , module , exports ) {
4688+ } , { "_process" :27 } ] , 27 :[ function ( require , module , exports ) {
46694689// shim for using process in browser
46704690
46714691var process = module . exports = { } ;
@@ -4757,7 +4777,7 @@ process.chdir = function (dir) {
47574777} ;
47584778process . umask = function ( ) { return 0 ; } ;
47594779
4760- } , { } ] , 27 :[ function ( require , module , exports ) {
4780+ } , { } ] , 28 :[ function ( require , module , exports ) {
47614781( function ( global ) {
47624782/*! https://mths.be/punycode v1.3.2 by @mathias */
47634783; ( function ( root ) {
@@ -5291,7 +5311,7 @@ process.umask = function() { return 0; };
52915311} ( this ) ) ;
52925312
52935313} ) . call ( this , typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : { } )
5294- } , { } ] , 28 :[ function ( require , module , exports ) {
5314+ } , { } ] , 29 :[ function ( require , module , exports ) {
52955315// Copyright Joyent, Inc. and other Node contributors.
52965316//
52975317// Permission is hereby granted, free of charge, to any person obtaining a
@@ -5377,7 +5397,7 @@ var isArray = Array.isArray || function (xs) {
53775397 return Object . prototype . toString . call ( xs ) === '[object Array]' ;
53785398} ;
53795399
5380- } , { } ] , 29 :[ function ( require , module , exports ) {
5400+ } , { } ] , 30 :[ function ( require , module , exports ) {
53815401// Copyright Joyent, Inc. and other Node contributors.
53825402//
53835403// Permission is hereby granted, free of charge, to any person obtaining a
@@ -5464,16 +5484,16 @@ var objectKeys = Object.keys || function (obj) {
54645484 return res ;
54655485} ;
54665486
5467- } , { } ] , 30 :[ function ( require , module , exports ) {
5487+ } , { } ] , 31 :[ function ( require , module , exports ) {
54685488'use strict' ;
54695489
54705490exports . decode = exports . parse = require ( './decode' ) ;
54715491exports . encode = exports . stringify = require ( './encode' ) ;
54725492
5473- } , { "./decode" :28 , "./encode" :29 } ] , 31 :[ function ( require , module , exports ) {
5493+ } , { "./decode" :29 , "./encode" :30 } ] , 32 :[ function ( require , module , exports ) {
54745494module . exports = require ( "./lib/_stream_duplex.js" )
54755495
5476- } , { "./lib/_stream_duplex.js" :32 } ] , 32 :[ function ( require , module , exports ) {
5496+ } , { "./lib/_stream_duplex.js" :33 } ] , 33 :[ function ( require , module , exports ) {
54775497( function ( process ) {
54785498// Copyright Joyent, Inc. and other Node contributors.
54795499//
@@ -5566,7 +5586,7 @@ function forEach (xs, f) {
55665586}
55675587
55685588} ) . call ( this , require ( '_process' ) )
5569- } , { "./_stream_readable" :34 , "./_stream_writable" :36 , "_process" :26 , "core-util-is" :37 , "inherits" :23 } ] , 33 :[ function ( require , module , exports ) {
5589+ } , { "./_stream_readable" :35 , "./_stream_writable" :37 , "_process" :27 , "core-util-is" :38 , "inherits" :24 } ] , 34 :[ function ( require , module , exports ) {
55705590// Copyright Joyent, Inc. and other Node contributors.
55715591//
55725592// Permission is hereby granted, free of charge, to any person obtaining a
@@ -5614,7 +5634,7 @@ PassThrough.prototype._transform = function(chunk, encoding, cb) {
56145634 cb ( null , chunk ) ;
56155635} ;
56165636
5617- } , { "./_stream_transform" :35 , "core-util-is" :37 , "inherits" :23 } ] , 34 :[ function ( require , module , exports ) {
5637+ } , { "./_stream_transform" :36 , "core-util-is" :38 , "inherits" :24 } ] , 35 :[ function ( require , module , exports ) {
56185638( function ( process ) {
56195639// Copyright Joyent, Inc. and other Node contributors.
56205640//
@@ -6569,7 +6589,7 @@ function indexOf (xs, x) {
65696589}
65706590
65716591} ) . call ( this , require ( '_process' ) )
6572- } , { "./_stream_duplex" :32 , "_process" :26 , "buffer" :14 , "core-util-is" :37 , "events" :18 , "inherits" :23 , "isarray" :24 , "stream" :42 , "string_decoder/" :43 , "util" :13 } ] , 35 :[ function ( require , module , exports ) {
6592+ } , { "./_stream_duplex" :33 , "_process" :27 , "buffer" :14 , "core-util-is" :38 , "events" :18 , "inherits" :24 , "isarray" :25 , "stream" :43 , "string_decoder/" :44 , "util" :13 } ] , 36 :[ function ( require , module , exports ) {
65736593// Copyright Joyent, Inc. and other Node contributors.
65746594//
65756595// Permission is hereby granted, free of charge, to any person obtaining a
@@ -6780,7 +6800,7 @@ function done(stream, er) {
67806800 return stream . push ( null ) ;
67816801}
67826802
6783- } , { "./_stream_duplex" :32 , "core-util-is" :37 , "inherits" :23 } ] , 36 :[ function ( require , module , exports ) {
6803+ } , { "./_stream_duplex" :33 , "core-util-is" :38 , "inherits" :24 } ] , 37 :[ function ( require , module , exports ) {
67846804( function ( process ) {
67856805// Copyright Joyent, Inc. and other Node contributors.
67866806//
@@ -7261,7 +7281,7 @@ function endWritable(stream, state, cb) {
72617281}
72627282
72637283} ) . call ( this , require ( '_process' ) )
7264- } , { "./_stream_duplex" :32 , "_process" :26 , "buffer" :14 , "core-util-is" :37 , "inherits" :23 , "stream" :42 } ] , 37 :[ function ( require , module , exports ) {
7284+ } , { "./_stream_duplex" :33 , "_process" :27 , "buffer" :14 , "core-util-is" :38 , "inherits" :24 , "stream" :43 } ] , 38 :[ function ( require , module , exports ) {
72657285( function ( Buffer ) {
72667286// Copyright Joyent, Inc. and other Node contributors.
72677287//
@@ -7371,10 +7391,10 @@ function objectToString(o) {
73717391 return Object . prototype . toString . call ( o ) ;
73727392}
73737393} ) . call ( this , require ( "buffer" ) . Buffer )
7374- } , { "buffer" :14 } ] , 38 :[ function ( require , module , exports ) {
7394+ } , { "buffer" :14 } ] , 39 :[ function ( require , module , exports ) {
73757395module . exports = require ( "./lib/_stream_passthrough.js" )
73767396
7377- } , { "./lib/_stream_passthrough.js" :33 } ] , 39 :[ function ( require , module , exports ) {
7397+ } , { "./lib/_stream_passthrough.js" :34 } ] , 40 :[ function ( require , module , exports ) {
73787398exports = module . exports = require ( './lib/_stream_readable.js' ) ;
73797399exports . Stream = require ( 'stream' ) ;
73807400exports . Readable = exports ;
@@ -7383,13 +7403,13 @@ exports.Duplex = require('./lib/_stream_duplex.js');
73837403exports . Transform = require ( './lib/_stream_transform.js' ) ;
73847404exports . PassThrough = require ( './lib/_stream_passthrough.js' ) ;
73857405
7386- } , { "./lib/_stream_duplex.js" :32 , "./lib/_stream_passthrough.js" :33 , "./lib/_stream_readable.js" :34 , "./lib/_stream_transform.js" :35 , "./lib/_stream_writable.js" :36 , "stream" :42 } ] , 40 :[ function ( require , module , exports ) {
7406+ } , { "./lib/_stream_duplex.js" :33 , "./lib/_stream_passthrough.js" :34 , "./lib/_stream_readable.js" :35 , "./lib/_stream_transform.js" :36 , "./lib/_stream_writable.js" :37 , "stream" :43 } ] , 41 :[ function ( require , module , exports ) {
73877407module . exports = require ( "./lib/_stream_transform.js" )
73887408
7389- } , { "./lib/_stream_transform.js" :35 } ] , 41 :[ function ( require , module , exports ) {
7409+ } , { "./lib/_stream_transform.js" :36 } ] , 42 :[ function ( require , module , exports ) {
73907410module . exports = require ( "./lib/_stream_writable.js" )
73917411
7392- } , { "./lib/_stream_writable.js" :36 } ] , 42 :[ function ( require , module , exports ) {
7412+ } , { "./lib/_stream_writable.js" :37 } ] , 43 :[ function ( require , module , exports ) {
73937413// Copyright Joyent, Inc. and other Node contributors.
73947414//
73957415// Permission is hereby granted, free of charge, to any person obtaining a
@@ -7518,7 +7538,7 @@ Stream.prototype.pipe = function(dest, options) {
75187538 return dest ;
75197539} ;
75207540
7521- } , { "events" :18 , "inherits" :23 , "readable-stream/duplex.js" :31 , "readable-stream/passthrough.js" :38 , "readable-stream/readable.js" :39 , "readable-stream/transform.js" :40 , "readable-stream/writable.js" :41 } ] , 43 :[ function ( require , module , exports ) {
7541+ } , { "events" :18 , "inherits" :24 , "readable-stream/duplex.js" :32 , "readable-stream/passthrough.js" :39 , "readable-stream/readable.js" :40 , "readable-stream/transform.js" :41 , "readable-stream/writable.js" :42 } ] , 44 :[ function ( require , module , exports ) {
75227542// Copyright Joyent, Inc. and other Node contributors.
75237543//
75247544// Permission is hereby granted, free of charge, to any person obtaining a
@@ -7741,7 +7761,7 @@ function base64DetectIncompleteChar(buffer) {
77417761 this . charLength = this . charReceived ? 3 : 0 ;
77427762}
77437763
7744- } , { "buffer" :14 } ] , 44 :[ function ( require , module , exports ) {
7764+ } , { "buffer" :14 } ] , 45 :[ function ( require , module , exports ) {
77457765// Copyright Joyent, Inc. and other Node contributors.
77467766//
77477767// Permission is hereby granted, free of charge, to any person obtaining a
@@ -8450,14 +8470,14 @@ function isNullOrUndefined(arg) {
84508470 return arg == null ;
84518471}
84528472
8453- } , { "punycode" :27 , "querystring" :30 } ] , 45 :[ function ( require , module , exports ) {
8473+ } , { "punycode" :28 , "querystring" :31 } ] , 46 :[ function ( require , module , exports ) {
84548474module . exports = function isBuffer ( arg ) {
84558475 return arg && typeof arg === 'object'
84568476 && typeof arg . copy === 'function'
84578477 && typeof arg . fill === 'function'
84588478 && typeof arg . readUInt8 === 'function' ;
84598479}
8460- } , { } ] , 46 :[ function ( require , module , exports ) {
8480+ } , { } ] , 47 :[ function ( require , module , exports ) {
84618481( function ( process , global ) {
84628482// Copyright Joyent, Inc. and other Node contributors.
84638483//
@@ -9047,7 +9067,7 @@ function hasOwnProperty(obj, prop) {
90479067}
90489068
90499069} ) . call ( this , require ( '_process' ) , typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : { } )
9050- } , { "./support/isBuffer" :45 , "_process" :26 , "inherits" :23 } ] , 47 :[ function ( require , module , exports ) {
9070+ } , { "./support/isBuffer" :46 , "_process" :27 , "inherits" :24 } ] , 48 :[ function ( require , module , exports ) {
90519071var hasOwn = Object . prototype . hasOwnProperty ;
90529072var toStr = Object . prototype . toString ;
90539073var undefined ;
@@ -9138,13 +9158,13 @@ module.exports = function extend() {
91389158} ;
91399159
91409160
9141- } , { } ] , 48 :[ function ( require , module , exports ) {
9161+ } , { } ] , 49 :[ function ( require , module , exports ) {
91429162( function ( process ) {
91439163module . exports = process . env . LINKEDLIST_COV
91449164 ? require ( './lib-cov/linkedlist' )
91459165 : require ( './lib/linkedlist' )
91469166} ) . call ( this , require ( '_process' ) )
9147- } , { "./lib-cov/linkedlist" :49 , "./lib/linkedlist" :50 , "_process" :26 } ] , 49 :[ function ( require , module , exports ) {
9167+ } , { "./lib-cov/linkedlist" :50 , "./lib/linkedlist" :51 , "_process" :27 } ] , 50 :[ function ( require , module , exports ) {
91489168/* automatically generated by JSCoverage - do not edit */
91499169if ( typeof _$jscoverage === 'undefined' ) _$jscoverage = { } ;
91509170if ( ! _$jscoverage [ 'linkedlist.js' ] ) {
@@ -9511,7 +9531,7 @@ function Item(data, prev, next) {
95119531}
95129532_$jscoverage [ 'linkedlist.js' ] . source = [ "module.exports = function () {" , " Object.defineProperty(this, '_head', {" , " value: undefined," , " writable: true," , " enumerable: false," , " configurable: false" , " })" , " Object.defineProperty(this, '_tail', {" , " value: undefined," , " writable: true," , " enumerable: false," , " configurable: false" , " })" , " Object.defineProperty(this, '_next', {" , " value: undefined," , " writable: true," , " enumerable: false," , " configurable: false" , " })" , " Object.defineProperty(this, '_length', {" , " value: 0," , " writable: true," , " enumerable: false," , " configurable: false" , " })" , "}" , "" , "module.exports.prototype.__defineGetter__('head', function () {" , " return this._head && this._head.data" , "})" , "" , "module.exports.prototype.__defineGetter__('tail', function () {" , " return this._tail && this._tail.data" , "})" , "" , "module.exports.prototype.__defineGetter__('current', function () {" , " return this._current && this._current.data" , "})" , "" , "module.exports.prototype.__defineGetter__('length', function () {" , " return this._length" , "})" , "" , "module.exports.prototype.push = function (data) {" , " this._tail = new Item(data, this._tail)" , " if (this._length === 0) {" , " this._head = this._tail" , " this._current = this._head" , " this._next = this._head" , " }" , " this._length++" , "}" , "" , "module.exports.prototype.pop = function () {" , " var tail = this._tail" , " if (this._length === 0) {" , " return" , " }" , " this._length--" , " if (this._length === 0) {" , " this._head = this._tail = this._current = this._next = undefined" , " return tail.data" , " }" , " this._tail = tail.prev" , " this._tail.next = undefined" , " if (this._current === tail) {" , " this._current = this._tail" , " this._next = undefined" , " }" , " return tail.data" , "}" , "" , "module.exports.prototype.shift = function () {" , " var head = this._head" , " if (this._length === 0) {" , " return" , " }" , " this._length--" , " if (this._length === 0) {" , " this._head = this._tail = this._current = this._next = undefined" , " return head.data" , " }" , " this._head = this._head.next" , " if (this._current === head) {" , " this._current = this._head" , " this._next = this._current.next" , " }" , " return head.data" , "}" , "" , "module.exports.prototype.unshift = function (data) {" , " this._head = new Item(data, undefined, this._head)" , " if (this._length === 0) {" , " this._tail = this._head" , " this._next = this._head" , " }" , " this._length++" , "}" , "" , "module.exports.prototype.unshiftCurrent = function () {" , " var current = this._current" , " if (current === this._head || this._length < 2) {" , " return current && current.data" , " }" , " // remove" , " if (current === this._tail) {" , " this._tail = current.prev" , " this._tail.next = undefined" , " this._current = this._tail" , " } else {" , " current.next.prev = current.prev" , " current.prev.next = current.next" , " this._current = current.prev" , " }" , " this._next = this._current.next" , " // unshift" , " current.next = this._head" , " current.prev = undefined" , " this._head.prev = current" , " this._head = current" , " return current.data" , "}" , "" , "module.exports.prototype.removeCurrent = function (data) {" , " var current = this._current" , " if (this._length === 0) {" , " return" , " }" , " this._length--" , " if (this._length === 0) {" , " this._head = this._tail = this._current = this._next = undefined" , " return current.data" , " }" , " if (current === this._tail) {" , " this._tail = current.prev" , " this._tail.next = undefined" , " this._current = this._tail" , " } else if (current === this._head) {" , " this._head = current.next" , " this._head.prev = undefined" , " this._current = this._head" , " } else {" , " current.next.prev = current.prev" , " current.prev.next = current.next" , " this._current = current.prev" , " }" , " this._next = this._current.next" , " return current.data" , "}" , "" , "module.exports.prototype.next = function () {" , " var next = this._next" , " if (next !== undefined) {" , " this._next = next.next" , " this._current = next" , " return next.data" , " }" , "}" , "" , "module.exports.prototype.resetCursor = function () {" , " this._current = this._next = this._head" , " return this" , "}" , "" , "function Item (data, prev, next) {" , " this.next = next" , " if (next) next.prev = this" , " this.prev = prev" , " if (prev) prev.next = this" , " this.data = data" , "}" ] ;
95139533
9514- } , { } ] , 50 :[ function ( require , module , exports ) {
9534+ } , { } ] , 51 :[ function ( require , module , exports ) {
95159535module . exports = function ( ) {
95169536 Object . defineProperty ( this , '_head' , {
95179537 value : undefined ,
0 commit comments