klaudiosinani / doublie Goto Github PK
View Code? Open in Web Editor NEWDoubly circular & linear linked lists for ES6
License: MIT License
Doubly circular & linear linked lists for ES6
License: MIT License
The following issue will act as a progress tracking thread, regarding the implementation of the exposed Linear
class methods:
Linear#append(...values)
Linear#filter(fn)
Linear#forEach(fn)
Linear#get(index)
Linear#join(separator)
Linear#reduce(fn, accumulator)
Linear#map(fn)
Linear#node(index)
Linear#prepend(...values)
Linear#remove(index)
Linear#reverse()
Linear#set({value, index})
Linear#toArray()
Linear#reduceRight(fn, accumulator)
Linear#insert({value, index})
Add TypeScript support by declaring types for the exported Doublie API methods.
Please visit the contributing guidelines to learn more on how to translate Doublie's documentation into more languages.
Tons of thank you to everyone for your help and support! ❤️
Is your feature request related to a problem? Please describe.
In the typescript definitions, the node properties .next
and .prev
are of type Instance<T> | null
, even for circular doubly linked list nodes (which uses the same type), meaning that using it in strict mode involves a lot of null checks that this type should not need.
Describe the solution you'd like
The node properties in this case should only be of type Instance<T>
.
Additional context
n/a
The following issue will act as a progress tracking thread, regarding the implementation of the exposed Circular
class methods:
Circular#append(...values)
Circular#filter(fn)
Circular#forEach(fn)
Circular#get(index)
Circular#join(separator)
Circular#reduce(fn, accumulator)
Circular#map(fn)
Circular#node(index)
Circular#prepend(...values)
Circular#remove(index)
Circular#reverse()
Circular#set({value, index})
Circular#toArray()
Circular#reduceRight(fn, accumulator)
Circular#insert({value, index})
Circular#toLinear()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.