@mdui/jq
Version:
拥有和 jQuery 相似 API 的轻量级 JavaScript 工具库
12 lines (11 loc) • 349 B
JavaScript
import { $ } from '../$.js';
import './filter.js';
import './map.js';
import './index.js';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
$.fn.not = function (selector) {
const $excludes = this.filter(selector);
return this.map((_, element) => {
return $excludes.index(element) > -1 ? undefined : element;
});
};