Skip to content

Commit

Permalink
Merge pull request #7 from oshx/fix/build
Browse files Browse the repository at this point in the history
Updated by IDE.
Added keywords for this package.
Removed too many changes with '.idea' IDE files.
Updated a README.md.
  • Loading branch information
oshx authored Jul 3, 2024
2 parents 3b14498 + ce13140 commit ed8a4c3
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 162 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,7 @@ dist
.yarn/install-state.gz
.pnp.*

.idea
.vscode

lib/
12 changes: 0 additions & 12 deletions .idea/base-library.iml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

7 changes: 0 additions & 7 deletions .idea/prettier.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

127 changes: 0 additions & 127 deletions .idea/workspace.xml

This file was deleted.

29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,38 @@ Trivial shorthand tool for specific fits.

## APIs
### Once-series

`onceIframe`

Hidden iframe will be created temporarily.

Imagine this situation. You have role in web development, and your web application will be launched in a webview of that
app. Sometimes, you should call some `appscheme` or `deeplink` in your hidden iframe.

It should be useful!

`onceScript`

Script file called with memoized.

You can use that while dynamic import with legacy javascript files. Sometimes you can use that with logging.

```typescript
import { onceIframe, onceScript } from '@oshx/dom-tools';

onceIframe('app://scheme');
// call that app scheme then iframe will be disappeared after 300 miliseconds

onceIframe('https://deeplink.page');
onceIframe('https://deeplink.page', 100);
// call that deeplink page then iframe will be disappeared after 100 miliseconds

onceScript('https://lib.site/temp/logger.js');
```

### Unique DOM

It has objects like html, head, body. And you can check your `once` series called list.

```typescript
import { uniqueDOM } from '@oshx/dom-tools';

Expand All @@ -41,6 +62,9 @@ import { uniqueDOM } from '@oshx/dom-tools';
```

### Constants

It contains some trivial Regular Expressions.

```typescript
import { REGEXP_VALID_URI, REGEXP_VALID_PATH } from '@oshx/dom-tools';

Expand All @@ -50,6 +74,9 @@ REGEXP_VALID_PATH.test('./path/to/valid');
```

### Types

Do you need assistance?

```typescript
import { UniqueDOM } from '@oshx/dom-tools/@types';
```
Expand Down
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
{
"name": "@oshx/dom-tools",
"version": "1.0.3",
"version": "1.0.4",
"description": "Trivial shorthand tool for specific fits",
"keywords": [
"typescript",
"dom",
"alias",
"appscheme",
"iframe",
"script"
],
"entry": "src/index.ts",
"main": "lib/index.js",
"sourceRoot": "./src/",
Expand Down

0 comments on commit ed8a4c3

Please sign in to comment.