SkillAgentSearch skills...

Q.JS

A set of functions for making assertions and queue/list/array processing more straight forward.

Install / Use

/learn @rudenoise/Q.JS
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Q(estion/ueue)

A set of functions for making assertions and queue/list/array processing more straight forward.

It has very high unit test coverage so can confidently be used to reduce the number assertion based tests in other areas.

Methods starting is* return boolean for first argument.

The rest allow creation of functions that iterate over lists (fold and map are probably most usefull).

Q is heavily inspired by Scheme and the exercises in the Little Schemer by Daniel P Freidman and Matthhias Felleisen.

isF(untion) isO(bject) isA(rray) isS(tring) isN(umber) isE(mpty)A(rr) isE(mpty)S(tr) isEq(al) isU(ndefined) areEq(ual) inA(rray)

List processing, uses iterative or recursive technique (set to iterative by default - although some JS engines are tail recursion optimised and run faster than iteration)

h(head) - returns the head of a list h([1,2,3]);//1 t(ail) - returns the tail of a list Q.t([1,2,3]);//[2,3] cons(concat in front)

objHas - obj = {a: {b: {c: 1}}} -> objHas(obj, "a.b.c") // true Q.objHas(obj, "a.x.y.z") // false

Code comments should describe usage

Q.JS by Joel Hughes is licensed under a Creative Commons Attribution 3.0 Unported License This work is licenced under the Creative Commons Attribution 3.0 Unported License. To view a copy of this licence, visit http://creativecommons.org/licenses/by/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California 94105, USA.

View on GitHub
GitHub Stars5
CategoryDevelopment
Updated23d ago
Forks2

Languages

JavaScript

Security Score

70/100

Audited on Mar 10, 2026

No findings