0.4.2 • Published 6 months ago

embaralha v0.4.2

Weekly downloads
1
License
MIT
Repository
gitlab
Last release
6 months ago

embaralha

npm.io npm.io npm.io npm.io

Shuffles characters in given html element, then restores it's original text. Embaralha means "to shuffle" in portuguese.

npm.io

As you can observe in this GIF, I strongly recomend that you use a monospace font ;)

Instalation

npm i embaralha or just grab the index.js file.

Usage

If you want to shuffle the text in the mouseover event, you could do it like this:

import { embaralha } from 'embaralha';
const elem = document.querySelector('.your-embaralha-class');
elem.addEventListener('mouseover', async () => embaralha(elem, 1000));

Contributing

Any contribution is welcome, just make sure the tests (npm test) are passing, but don't worry about the webdriver tests (the ones in the test/specs dir). And if you'd be so kind, write your tests for your additions.

Also, you can run it locally with npm start and then going to http://localhost:8080

To Do

  • ~don't change char when white space ("respect the words")~
  • bug fix when mouseover multiple times causing loss of orinal text
  • use webdriver properly
  • use eslint
  • ~lower the dist file size~
  • add to microjs

License

MIT License found in LICENSE file.

0.4.2

6 months ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago