Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true

[*.{json,md,yaml}]
indent_size = 2
indent_style = space
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

4 changes: 0 additions & 4 deletions .eslintrc

This file was deleted.

27 changes: 1 addition & 26 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,2 @@
# OS X
.DS_Store*
Icon?
._*

# Windows
Thumbs.db
ehthumbs.db
Desktop.ini

# Linux
.directory
*~


# npm
node_modules
package-lock.json
*.log
*.gz


# Coveralls
coverage

# Benchmarking
benchmarks/graphs
.DS_Store
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm-lock.yaml
8 changes: 4 additions & 4 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License
The MIT License (MIT)

Copyright (c) 2019 Ignatius Bagus
Copyright (c) Ignatius Bagus <ignatius.mbs@gmail.com> (https://mauss.dev)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -9,8 +9,8 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
Expand Down
56 changes: 8 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,19 @@
# Scramble &middot; [![](https://img.shields.io/bundlephobia/minzip/@ignatiusmb/scramble.svg?label=minzip&style=popout)]()&nbsp;[![](https://img.shields.io/npm/v/@ignatiusmb/scramble.svg?style=popout)](https://www.npmjs.com/package/@ignatiusmb/scramble)&nbsp;[![](https://data.jsdelivr.com/v1/package/gh/ignatiusmb/scramble/badge?style=rounded)](https://www.jsdelivr.com/package/gh/ignatiusmb/scramble)
# Scramble &middot; ![bundle size](https://img.shields.io/bundlephobia/minzip/@ignatiusmb/scramble.svg?label=minzip&style=popout) [![version](https://img.shields.io/npm/v/@ignatiusmb/scramble.svg?style=popout)](https://www.npmjs.com/package/@ignatiusmb/scramble)

<blockquote align=center>
<em>Scramble</em> is a JavaScript animation library for texts.<br>
Quick setup with minimal hassle.
</blockquote>

<p align=center>
<a href="https://scramble.js.org">Homepage</a>
&nbsp;&middot;&nbsp;
<a href="https://scramble.js.org/documentation">Documentation</a>
&nbsp;&middot;&nbsp;
<a href="https://scramble.js.org/demos">Demos and examples</a>
</p>
A JavaScript animation library for texts.

```javascript
const scramble = require('@ignatiusmb/scramble')
scramble(document.querySelector('#yourElement')).run() // single element
import { scramble } from '@ignatiusmb/scramble';

scramble(document.querySelectorAll('.scramble-group')) // multiple elements
scramble(document.querySelector('...')).run();
```

## Installation

### via NPM

```sh
$ npm install @ignatiusmb/scramble
```

### via UNPKG

```html
<script src="https://unpkg.com/@ignatiusmb/scramble@3.0.1/lib/scramble.min.js"></script>
```bash
pnpm add @ignatiusmb/scramble
```

### via jsDelivr

```html
<script src="https://cdn.jsdelivr.net/gh/ignatiusmb/scramble@3.0.1/lib/scramble.min.js"></script>
```

---

<h3 align="center">
Scramble is <a href=LICENSE>MIT licensed</a>
</h3>

---
***

<p align="center">
<a href="https://ignatiusmb.github.io">ignatiusmb.io</a>
&middot;
<a href="https://www.imbagus.com">imbagus.com</a>
&middot;
<a href="https://github.com/ignatiusmb">GitHub</a>
&middot;
<a href="https://gitlab.com/ignatiusmb">GitLab</a>
</p>
<h3 align="center"><pre>@ignatiusmb/scramble | <a href="LICENSE">MIT License</a></pre></h3>
43 changes: 0 additions & 43 deletions build.js

This file was deleted.

18 changes: 18 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
declare module '@ignatiusmb/scramble' {
export function disorder(element: HTMLElement): {
original: string;
start(): void;
stop(): void;
};

export function scramble(node: HTMLElement): {
worker: ReturnType<typeof disorder>;
readonly finished: boolean;
run(): void;
destroy(): void;
};

export function successive(elements: NodeListOf<HTMLElement>): {
run(): void;
};
}
160 changes: 0 additions & 160 deletions lib/scramble.es.js

This file was deleted.

Loading