1.1.5 • Published 5 years ago

tmutil v1.1.5

Weekly downloads
1
License
MIT
Repository
gitlab
Last release
5 years ago

Powered by Tanuel Documentation Build Pipeline npm version npm

TmUtil

Simple collection of function or wrappers i use for my own projects.

This was originally created for my own projects like TmWindow or TmBox, but is open to be used by anyone

Reference can be found here

Installing

#yarn
yarn add tmutil

#npm
npm install tmutil

Usage (TypeScript)

//clear currently selected text
import {clearSelection} from "tmutil";
clearSelection();

//create a dom element with properties
import {create} from "tmutil";
const myDiv = create<"div">("div", {
    className: "myClass",
    id: "myId",
    style: {
        width: "100px",
        height: "100px"
    }
});

// loop over an object
import {each} from "tmutil"
const obj = {k1: "v1", k2: "v2"};
each(obj, (key, value) => {
    // do something with key and value
});
1.1.5

5 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago