
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
vQuery is a simple, light-weight, vanilla JS wrapper for jQuery-like syntax.
npm install --save vquery
import v from 'vquery'
v(selector, element, or string).method(props);
Download it from the repository, or you can use a CDN.
<script src="v.min.js"></script>
The methods below work like they do with jQuery, except they are just wrappers around document.querySelectorAll, and the associated vanilla JS dom manipulation functions.
Like jQuery and many other similar libraries, most of the methods can be chained.
Below are a few methods available. For the complete API documentation, visit the vQuery website.
v('.class-thing').nodes
-> [
<div class="class-thing">One</div>,
<div class="class-thing">Two</div>,
<div class="class-thing"><span id="three">Three</span></div>
]
v('.class-thing').node;
-> <div class="class-thing">One</div>
v('This string is not an element').nonElement;
-> "This string is not an element"
v('.class-thing').get(1).n;
-> <div class="class-thing">Two</div>
v('.class-thing').get(2).find('#three').node
-> <span id="three">Three</span>
v('.class-thing').length
-> 2
v('body > div.pre-render').click(myCleverClickEvent);
.children(CSS selector)
Returns an array of child nodes, or filters child nodes if a CSS selector parameter is passed to it.
.allChildren(CSS selector)
Like .children(), it returns an array of child nodes, but instead of returning just the first level of children, it deeply recurses every child node and returns an array of every element under the selected node at all levels of children.
.attr(object|string|Key, Value)
Pass an object of camel cased attribute keys, or a key/value pair of strings to set attribute(s). Calling the method without a parameter will return an object of the selected element's attributes.
.css(object)
Pass an object of camel cased style keys, or pass no parameter to return the computed style of the selected element.
.ajax(POST|GET, URL, options.data|options.chain)
true to pass the data through vQuery's context.v().ajax('GET', 'https://myawesome.net/api/request/').then((data)=>{
// Do something with the data.
}).catch((err)=>{
// Do something with the error.
});
v().ajax('GET', 'https://myawesome.net/api/request/', {chain: true}).then((data)=>{
console.log(data.nodes);
-> {...}
console.log(data.type());
-> 'object'
}).catch((err)=>{
// Do something with the error.
});
v([]).mixin({_:_}).isArray();
-> true
v(':header').mixin({$:$})
-> [<h3 id="install-using-npm">Install Using NPM</h3>, <h3 id="install-using-the-browser">Install Using The Browser</h3>, <h3 id="experiment-with-vquery-now">Experiment with vQuery Now</h3>, <h3 id="breaking-changes-in-4-3-0">Breaking changes in 4.3.0</h3>,...]
FAQs
A simple, light-weight, vanilla JS wrapper for jQuery-like syntax.
The npm package vquery receives a total of 3 weekly downloads. As such, vquery popularity was classified as not popular.
We found that vquery demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.