1.0.8 • Published 4 years ago

pqbd v1.0.8

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

pqbd

Can you never remember which is shift and which is unshift? Are you a competitive array manipulation speedrunner looking to shave 1-4 characters off of each of your method calls?

Then pqbd is for you!

pqbd stands for 'pop', 'qoq', 'bob', and 'dod'. What are those, you ask?

pop()

array.pop() is still good old array.pop()

element being popped off the end of an array

It pops an element off the end of an array and returns that element.

So then when you mirror pop vertically you get...

qoq()

array.qoq() is array.shift()

element being qoqqed off the start of an array

It qoqs an element off the start of the array and returns that element.

So that was a vertical mirror, but what if we mirror pop horizontally?

bob()

array.bob() is array.push()

element being bobbed onto the end of an array

It bobs an element onto the end of an array and returns the new length of the array.

One more, how about if we mirror pop vertically and horizontally?

dod()

array.dod is array.unshift()

element being dodded onto the start of an array

It dods an element on to the beginning of an array and returns the new length of the array.

FAQ

Should I use pqbd?

Probably not. It modifies the array prototype and may interfere with other packages. It may be used for recreational qoqqing and bobbing though.

Can I use pqbd with TypeScript?

Yes you can! It was written in TS but again, don't actually use it.

Coming soon

  • dop
  • qob
  • qop
  • dob
1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.3

4 years ago

1.0.0

4 years ago