<commit_before># sst.js

> Simple Set(Timeout || Interval) for Javascript.

`sst.js` is very easy to write `setTimeout` and `setInterval` process for Javascript.

```javascript
// with sst.js
sst(1, "min").once(function() {
  // do, after a minute
});

// with basic setTimeout
setTimeout(function(){
  // do, after minute
}, 60000);
```
```javascript
// available method chaining
sst(2, "s")
  .immediate(() => {
    console.log("run, immediately");
  })
  .once(() => {
    console.log("just a time");
  })
  .times(4, () => {
    console.log("run, 4 times");
  })
  .repeat(() => {
    console.log("run, per second");
  });
```

> Working with Browser and Node.js

## Installation

```bash
# npm
npm install sstjs --save
# yarn
yarn add sstjs
```

## import sst.js

```javascript
// CommonJS
const sst = require('sstjs')
// ES6
import sst from 'sstjs';
// browser
<script src="dist/sst.min.js"></script>
```

## Methods

### constructor(num, unit)

The constructor, you can set a time with human readable.

```javascript
// millisecond: ms, millisecond, milliseconds
sst(200, 'ms') // 200 milliseconds
// second: s, sec, second, seconds
sst(2, "sec") //  2 seconds
// minute: m, min, minute, minutes
sst(2, "min") // 2 minitues
```

### `.once(callback)`
<commit_msg>add CDN<commit_after># sst.js

> Simple Set(Timeout || Interval) for Javascript.

`sst.js` is very easy to write `setTimeout` and `setInterval` process for Javascript.

```javascript
// with sst.js
sst(1, "min").once(function() {
  // do, after a minute
});

// with basic setTimeout
setTimeout(function(){
  // do, after minute
}, 60000);
```
```javascript
// available method chaining
sst(2, "s")
  .immediate(() => {
    console.log("run, immediately");
  })
  .once(() => {
    console.log("just a time");
  })
  .times(4, () => {
    console.log("run, 4 times");
  })
  .repeat(() => {
    console.log("run, per second");
  });
```

> Working with Browser and Node.js

## Installation

```bash
# npm
npm install sstjs --save
# yarn
yarn add sstjs
```

## import sst.js

```javascript
// CommonJS
const sst = require('sstjs')
// ES6
import sst from 'sstjs';

// CDN
<script src="https://unpkg.com/sstjs/dist/sst.min.js"></script>

// browser
<script src="dist/sst.min.js"></script>
```

## Methods

### constructor(num, unit)

The constructor, you can set a time with human readable.

```javascript
// millisecond: ms, millisecond, milliseconds
sst(200, 'ms') // 200 milliseconds
// second: s, sec, second, seconds
sst(2, "sec") //  2 seconds
// minute: m, min, minute, minutes
sst(2, "min") // 2 minitues
```

### `.once(callback)`

{'fraction_non_alphanumeric': 0.19524357499041042, 'fraction_numerical': 0.01534330648254699, 'mean_word_length': 3.5356521739130433, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 21, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6212991', 'n_tokens_mistral': 984, 'n_tokens_neox': 917, 'n_words': 262}