@akrc/nashi
TypeScript icon, indicating that this package has built-in type declarations

0.2.4 • Public • Published

🍐 Nashi

The modern jQuery alternative.

Playground

StackBlitz CodeSandbox

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
import nashi from '@akrc/nashi';

const body = nashi('body');
const p = nashi
    .create('p')
    .text('Hello, World')
    .class('text-lg')
    .id('greet')
    .click(() => console.log('Hello'));
body.firstChild(p);

And see documention

Community

See Nashi awesome

Readme

Keywords

none

Package Sidebar

Install

npm i @akrc/nashi

Weekly Downloads

1

Version

0.2.4

License

ISC

Unpacked Size

52.7 kB

Total Files

8

Last publish

Collaborators

  • akarachen