jsquery_node 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/jsquery.js CHANGED
@@ -264,9 +264,7 @@ export const { $, JSQuery } = (() => {
264
264
  function J(q) {
265
265
  return Element.from(document.querySelector(q));
266
266
  }
267
- J.from = (elt) => {
268
- return Element.from(elt);
269
- };
267
+ J.from = Element.from;
270
268
  J.all = (q) => {
271
269
  return Element.from(document.querySelectorAll(q));
272
270
  };
package/jsquery.ts CHANGED
@@ -160,7 +160,7 @@ export const { $, JSQuery } = (() => {
160
160
  hasClass(name: string) {
161
161
  return this.elt.classList.contains(name);
162
162
  }
163
- $(q: any): Element {
163
+ $(q: any): Element|null {
164
164
  return J.from(this.elt.querySelector(q)) as any;
165
165
  }
166
166
  all(q: any): ElementArray {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsquery_node",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "jsquery",
5
5
  "homepage": "https://github.com/chickencuber/jsquery_node#readme",
6
6
  "bugs": {