quesk
Version:
Queue + Stack ADTs.
3 lines (2 loc) • 507 B
JavaScript
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.quesk=t()}(this,function(){return function(){var n=[];return{append:function(t){return n.push(t)},prepend:function(t){return n.unshift(t)},pop:function(){return n.pop()},shift:function(){n.shift()},first:function(){return n[0]},last:function(){return n.slice(-1)[0]},all:function(){return n},length:function(){return n.length}}}});
//# sourceMappingURL=quesk.min.js.map