🍐 The modern jQuery alternative

Overview

🍐 Nashi

🚧 Work in progress

The modern jQuery alternative.

Motivation

Write this:

nashi('p').text('hello').addClass('foo').toggleClass('bar');

Not that:

const p = document.querySelectorAll('p');
for (const item of p) {
    p.innerText = 'hello';
    p.classList.add('foo');
    p.classList.toggle('bar');
}

Get started

pnpm add @akrc/nashi
yarn add @akrc/nashi
npm install @akrc/nashi

And see documention

Comments
  • Event handler types do not include the possibility of the Event parameter.

    Event handler types do not include the possibility of the Event parameter.

    Hey, I have run into one more issue regarding Typescript specifically.

    I am going to use the click QueryResult function as an example.

    Currently, the type is as follows

    click(handler: () => void);
    

    I would like it to change to something like this:

    click(handler: (event?: Event) => void);
    

    This way, we won't need to do something like this:

    const button = nashi.create("button");
    const handleClick = (evt: PointerEvent) => {
      console.log("clicked", evt);
    }
    button.click(handleClick as () => void) // have to typecast to remove Typescript error.
    
    opened by jaymanmatthewsdev 4
  • Lacking functions

    Lacking functions

    Hey, I have run into usecases where I need specific functions that are not supplied at the moment.

    I understand that it is still early days for this library, and I am really loving it so far! However, I would like these functions to be implemented ASAP as it will make the Dev Ex better in my opinion.

    append - This function would take a list of QueryResult elements and append them as children to the targeted node, as such:

    append(...elements: QueryResult[])
    

    Example:

    const parentElement = nashi.create("div");
    const childElement = nashi.create("p");
    parentElement.append(childElement);
    

    attr - This function would take two strings (the first being the attribute name), and the second being the new value to set the attribute to, as such:

    attr(name: string, value: string)
    

    Example:

    const element = nashi.create("input");
    element.attr("value", "hello world!");
    // OR
    element.attr("type", "text");
    

    I also want the types, such as QueryResult and Input, to be exposed for personal use. If they are already exposed, I wasn't able to find the relevant documentation.

    Thanks heaps!

    • Jayman
    opened by jaymanmatthewsdev 3
  • Update typescript-eslint monorepo to v5.45.0

    Update typescript-eslint monorepo to v5.45.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | @typescript-eslint/eslint-plugin | 5.44.0 -> 5.45.0 | age | adoption | passing | confidence | | @typescript-eslint/parser | 5.44.0 -> 5.45.0 | age | adoption | passing | confidence |


    Release Notes

    typescript-eslint/typescript-eslint (@​typescript-eslint/eslint-plugin)

    v5.45.0

    Compare Source

    Bug Fixes
    • eslint-plugin: [array-type] --fix flag removes parentheses from type (#​5997) (42b33af)
    • eslint-plugin: [keyword-spacing] prevent crash on no options (#​6073) (1f19998)
    • eslint-plugin: [member-ordering] support private fields (#​5859) (f02761a)
    • eslint-plugin: [prefer-readonly] report if a member's property is reassigned (#​6043) (6e079eb)
    Features
    • eslint-plugin: [member-ordering] add a required option for required vs. optional member ordering (#​5965) (2abadc6)
    typescript-eslint/typescript-eslint (@​typescript-eslint/parser)

    v5.45.0

    Compare Source

    Note: Version bump only for package @​typescript-eslint/parser


    Configuration

    πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about these updates again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • Update dependency prettier to v2.8.0

    Update dependency prettier to v2.8.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | prettier (source) | 2.7.1 -> 2.8.0 | age | adoption | passing | confidence |


    Release Notes

    prettier/prettier

    v2.8.0

    Compare Source

    diff

    πŸ”— Release Notes


    Configuration

    πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • Update dependency vitest to v0.25.3

    Update dependency vitest to v0.25.3

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | vitest | 0.25.2 -> 0.25.3 | age | adoption | passing | confidence |


    Release Notes

    vitest-dev/vitest

    v0.25.3

    Compare Source

    Β Β Β πŸš€ Features
       🐞 Bug Fixes
    Β Β Β Β View changes on GitHub

    Configuration

    πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • Update typescript-eslint monorepo to v5.44.0

    Update typescript-eslint monorepo to v5.44.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | @typescript-eslint/eslint-plugin | 5.43.0 -> 5.44.0 | age | adoption | passing | confidence | | @typescript-eslint/parser | 5.43.0 -> 5.44.0 | age | adoption | passing | confidence |


    Release Notes

    typescript-eslint/typescript-eslint (@​typescript-eslint/eslint-plugin)

    v5.44.0

    Compare Source

    Bug Fixes
    • eslint-plugin: [no-empty-interface] disable autofix for declaration merging with class (#​5920) (a4f85b8)
    • eslint-plugin: [no-unnecessary-condition] handle index signature type (#​5912) (5baad08)
    • eslint-plugin: [prefer-optional-chain] handle binary expressions in negated or (#​5992) (2778ff0)
    • typescript-estree: don't consider a cached program unless it's specified in the current parserOptions.project config (#​5999) (530e0e6)
    Features
    • eslint-plugin: [adjacent-overload-signatures] check BlockStatement nodes (#​5998) (97d3e56)
    • eslint-plugin: [keyword-spacing] Support spacing in import-type syntax (#​5977) (6a735e1)
    typescript-eslint/typescript-eslint (@​typescript-eslint/parser)

    v5.44.0

    Compare Source

    Note: Version bump only for package @​typescript-eslint/parser


    Configuration

    πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about these updates again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • Update dependency eslint-plugin-unicorn to v45

    Update dependency eslint-plugin-unicorn to v45

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | eslint-plugin-unicorn | ^44.0.2 -> ^45.0.0 | age | adoption | passing | confidence |


    Release Notes

    sindresorhus/eslint-plugin-unicorn

    v45.0.0

    Compare Source

    New rules
    Improvements
    Fixes

    Configuration

    πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • Update dependency eslint-config-akrc to ^0.0.7

    Update dependency eslint-config-akrc to ^0.0.7

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | eslint-config-akrc | ^0.0.5 -> ^0.0.7 | age | adoption | passing | confidence |


    Configuration

    πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • Update dependency eslint-config-akrc to ^0.0.5

    Update dependency eslint-config-akrc to ^0.0.5

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | eslint-config-akrc | ^0.0.4 -> ^0.0.5 | age | adoption | passing | confidence |


    Configuration

    πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • Update dependency eslint-config-akrc to ^0.0.4

    Update dependency eslint-config-akrc to ^0.0.4

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | eslint-config-akrc | ^0.0.2 -> ^0.0.4 | age | adoption | passing | confidence |


    Configuration

    πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • Update dependency eslint-config-akrc to ^0.0.2

    Update dependency eslint-config-akrc to ^0.0.2

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | eslint-config-akrc | ^0.0.1 -> ^0.0.2 | age | adoption | passing | confidence |


    Configuration

    πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • Dependency Dashboard

    Dependency Dashboard

    This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

    This repository currently has no open or pending branches.

    Detected dependencies

    npm
    package.json
    • @babel/core ^7.20.2
    • @babel/preset-env ^7.20.2
    • @rollup/plugin-babel ^6.0.2
    • @typescript-eslint/eslint-plugin 5.45.0
    • @typescript-eslint/parser 5.45.0
    • @vuepress/client 2.0.0-beta.53
    • esbuild ^0.15.13
    • eslint ^8.27.0
    • eslint-config-airbnb-base ^15.0.0
    • eslint-config-akrc ^0.0.7
    • eslint-config-prettier 8.5.0
    • eslint-import-resolver-typescript ^3.5.2
    • eslint-plugin-import ^2.26.0
    • eslint-plugin-prettier 4.2.1
    • eslint-plugin-unicorn ^45.0.0
    • happy-dom ^7.7.0
    • husky 8.0.2
    • prettier 2.8.0
    • rollup ^3.2.5
    • rollup-plugin-copy ^3.4.0
    • rollup-plugin-esbuild ^5.0.0
    • rollup-plugin-filesize ^9.1.2
    • typescript 4.9.3
    • vite ^3.2.3
    • vitest 0.25.3
    • vue ^3.2.45
    • vuepress 2.0.0-beta.53

    • [ ] Check this box to trigger a request for Renovate to run again on this repository
    opened by renovate[bot] 0
A tiny, lightning fast jQuery-like library for modern browsers.

Sprint.js Sprint is a high-performance, 5KB (gzipped) DOM library for modern browsers. Sprint notably shines on bandwidth and resource constrained dev

Benjamin De Cock 4.3k Nov 27, 2022
Zepto.js is a minimalist JavaScript library for modern browsers, with a jQuery-compatible API

Zepto.js – a minimalist JavaScript library Zepto is a minimalist JavaScript library for modern browsers with a largely jQuery-compatible API. If you u

Thomas Fuchs 15k Nov 23, 2022
jQuery based scrolling Bar, for PC and Smartphones (touch events). It is modern slim, easy to integrate, easy to use. Tested on Firefox/Chrome/Maxthon/iPhone/Android. Very light <7ko min.js and <1Ko min.css.

Nice-Scrollbar Responsive jQuery based scrolling Bar, for PC and Smartphones (touch events). It is modern slim, easy to integrate, easy to use. Tested

Renan LAVAREC 2 Jan 18, 2022
A modern replacement for jQuery.marquee

vanilla-marquee An es5 vanilla-js implementation of jQuery.marquee Installation npm i vanilla-marquee Usage import marquee from 'vanilla-marquee' ne

null 25 Oct 25, 2022
Reorderable drag-and-drop lists for modern browsers and touch devices. No jQuery or framework required.

Sortable Sortable is a JavaScript library for reorderable drag-and-drop lists. Demo: http://sortablejs.github.io/Sortable/ Features Supports touch dev

SortableJS 26k Nov 30, 2022
An informal website of the alternative of KdB, an curriculum planning support system used in University of Tsukuba

alternative-tsukuba-kdb An informal website of the alternative of KdB, a curriculum planning support system used in University of Tsukuba. This reposi

いγͺにわうどん 27 Nov 25, 2022
A alternative to Github Copilot for vscode until you get the access to github copilot

Clara-Copilot ?? Code Howdy ?? I know you guys are ?? waiting for Github Copilot Here is a alternative one for now ?? ⭐ Star is all i want nothing muc

BadBoy17G 242 Nov 22, 2022
GetOsLocalesCrossPlatform - A cross platform alternative to get locales used on the platform. Works on Node, Electron, NW.js and Browsers

getOsLocalesCrossPlatform A cross platform alternative to get locales used on the platform. Works on Node, Electron, NW.js and Browsers This script is

null 1 Jan 2, 2022
A Fast & Light Virtual DOM Alternative

hyper(HTML) ?? Community Announcement Please ask questions in the dedicated discussions repository, to help the community around this project grow β™₯ A

Andrea Giammarchi 3k Nov 15, 2022
A container-friendly alternative to os.cpus().length. Both cgroups v1 and cgroups v2 are supported.

node-cpu-count A container-friendly alternative to os.cpus().length. Both cgroups v1 and cgroups v2 are supported. Installation $ npm install node-cpu

Jiahao Lu 2 Jan 17, 2022
A JSDOM alternative with support for server side rendering of web components

About A JSDOM alternative with support for server side rendering of web components. Happy DOM aim to support the most common functionality of a web br

David Ortner 1.6k Nov 28, 2022
Privacy-focused Google Fonts alternative

Privacy-focused Google Fonts CDN alternative I wrote it in an hour, so please report bugs here. Several improvements could be made here and there, so

coolLabs 236 Nov 23, 2022
(πŸ”—, 🌲) Web3 Link Tree is a free & open-source alternative to Linktree built with React.js, Next.js, Tailwind and Web3-React

Getting Started Read the detailed guide here Customize Add your name, wallet address, social media links and more in config.ts Images Save images to t

Naut 35 Sep 20, 2022
πŸ”§ Alternative to 'eval' in JavaScript that is customizable and safer!

?? better-eval An alternative to eval() in JavaScript that is customizable and safer! The eval function sucks, and there lacks alternatives that provi

Bharadwaj Duggaraju 32 Sep 14, 2022
An extension to Panic's Nova editor currently providing an alternative file browser.

Explorer.novaextension Welcome to the repository of the Explorer Nova extension. The actual extension and its README can be found only one directory a

null 7 Nov 14, 2022
A minimal & self-hostable alternative to pastebin intended for code

minBin A minimal & self-hostable alternative to pastebin intended for code Use ⌨️ A public instance is available at https://bin.kio.dev/ Building ?? n

Kio 2 Apr 19, 2022
An alternative viewer for DevDAO NFT with a βœ¨ο½ˆο½ο½Œο½ο½‡ο½’ο½ο½ο½ˆο½‰ο½ƒβœ¨ twist

Holo DevDAO An alternative viewer for DevDAO NFT with a ✨ holographic ✨ twist. Pre-requisites node version >= 15.0.1 & npm >= 7.20.6. If you have nvm

Naomi Hauret 18 Sep 23, 2022
Free Obisidian Publish alternative, for publishing your digital garden.

What is MindStone? MindStone is a free open-source alternative solution to Obsidian Publish Here how it look like once published, checkout demo versio

Tuan Cao 252 Nov 23, 2022
A Proxy based alternative to json-watch module.

@webreflection/json-watch Social Media Photo by Andrik Langfield on Unsplash A modern take at this 7yo json-watch module. import watcher from '@webref

Andrea Giammarchi 12 Sep 9, 2022