Giter Club home page Giter Club logo

deque's People

Contributors

petkaantonov avatar thesisb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deque's Issues

How to copy deque instance?

Hi, thank you for your work. It's great.

I'd like to use this module for my project. But, I need to copy the deque instance after creation. I guess the only way is making another deque instance after toArray from the previous one. I'm afraid of losing a performance gain in this way.

Any other better way to copy it?

Finite-length Deque

Hi, it would be nice if we could specify a maximum length for the queue. If you push onto a full queue, it pops from the end, never increasing in size above the specified maximum.

Cannot assign to read only property 'isEmpty' of #<Deque>

Hi Sir,
Please help me, how can I resolve this problem?

TypeError: Cannot assign to read only property 'isEmpty' of #
at Object. (C:\Users\Acer Valued Customer\Documents\Serboy\Coding\Analytics\Analytics.Web\node_modules\double-ended-queue\js\deque.js:185:25)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (C:\Users\Acer Valued Customer\Documents\Serboy\Coding\Analytics\Analytics.Web\node_modules\redis\index.js:8:13)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (C:\Users\Acer Valued Customer\Documents\Serboy\Coding\Analytics\Analytics.Web\node_modules\connect-redis\lib\connect-redis.js:8:13)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (C:\Users\Acer Valued Customer\Documents\Serboy\Coding\Analytics\Analytics.Web\node_modules\connect-redis\index.js:1:80)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)

Thanks,

Queue Item Id

i am using this in my project , but problem is that i am not getting queue item id , because i want remove item from queue , when user cancel the request . is it possible?

Deque doesn't expose length

Hi @petkaantonov -

I'd like to be able to iterate over the elements in a queue without converting it to an array. To do this I need to expose Deque's length attribute (i.e. change it from _length to length). I'd be happy to submit a PR for this if you think it's a reasonable change. Please let me know.

Ryan

Native array is faster than this[]

I'm getting significantly faster performance using a native array this.arr = []; and replacing all instances of this[] with this.arr[] . Running the two_million benchmark, I'm getting ~23 milllion ops/s with this[] vs 25-26 million ops/s using this.arr[]

Thoughts?

Darwin 13.4.0 x64
Node.JS 4.1.2
V8 4.5.103.35
Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz ร— 8

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.