Skip to content

Commit c1503c9

Browse files
committed
🎉 generate project using boilerplate
0 parents  commit c1503c9

37 files changed

+10868
-0
lines changed

‎.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Settings for editors and IDEs.
2+
# References at https://editorconfig.org/.
3+
4+
root = true
5+
6+
# Settings for any file.
7+
[*]
8+
charset = utf-8
9+
end_of_line = lf
10+
indent_size = 2
11+
indent_style = space
12+
insert_final_newline = true
13+
trim_trailing_whitespace = true

‎.eslintignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Unlinted files and folders.
2+
# References at https://eslint.org/docs/user-guide/configuring#eslintignore
3+
4+
# Generated docs, bundles and type definitions.
5+
docs/
6+
dist/
7+
types/

‎.eslintrc.js

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// @ts-check
2+
/* eslint-env node */
3+
4+
'use strict';
5+
6+
/**
7+
* An object with ESLint options.
8+
* @type {import('eslint').Linter.Config}
9+
*/
10+
const options = {
11+
root: true,
12+
parser: '@typescript-eslint/parser',
13+
parserOptions: {
14+
ecmaFeatures: {
15+
jsx: true,
16+
},
17+
ecmaVersion: 2021,
18+
},
19+
plugins: ['@typescript-eslint'],
20+
extends: [
21+
'eslint:recommended',
22+
'plugin:prettier/recommended',
23+
'plugin:@typescript-eslint/eslint-recommended',
24+
'plugin:@typescript-eslint/recommended',
25+
],
26+
};
27+
28+
module.exports = options;

‎.gitattributes

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# File attributes for Git repository.
2+
# References at https://git-scm.com/docs/gitattributes.
3+
4+
# Handle files as text and ensure Unix line endings.
5+
* text=auto eol=lf
6+
7+
# Ignore differences on NPM's lockfile.
8+
# Since version 5.7.0, NPM automatically handles merge conflicts.
9+
package-lock.json -diff

‎.github/actions/setup/action.yaml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: 'Setup'
2+
description: "Setups Node.js and npm to run GitHub Actions' jobs."
3+
runs:
4+
using: 'composite'
5+
steps:
6+
- name: 'Setup Node.js'
7+
uses: 'actions/setup-node@v3'
8+
with:
9+
node-version: '16.x'
10+
cache: 'npm'
11+
cache-dependency-path: '**/package-lock.json'
12+
13+
- name: 'Keep npm cache for future workflows'
14+
uses: 'actions/cache@v3'
15+
with:
16+
key: "${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}"
17+
path: '~/.npm'
18+
restore-keys: |
19+
${{ runner.os }}-node-
20+
21+
- name: 'Install dependencies'
22+
run: 'npm ci'
23+
shell: 'bash'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: 'Continuous Integrations'
2+
3+
on:
4+
push:
5+
branches: ['main']
6+
7+
jobs:
8+
lint:
9+
name: 'Run ESLint and Prettier'
10+
runs-on: 'ubuntu-latest'
11+
steps:
12+
- name: 'Checkout the repository'
13+
uses: 'actions/checkout@v3'
14+
15+
- name: 'Setup Node.js and npm'
16+
uses: './.github/actions/setup'
17+
18+
- name: 'Execute the lint script'
19+
run: 'npm run lint'
20+
21+
22+
test:
23+
name: 'Run unit tests with Jest'
24+
runs-on: 'ubuntu-latest'
25+
steps:
26+
- name: 'Checkout the repository'
27+
uses: 'actions/checkout@v3'
28+
29+
- name: 'Setup Node.js and npm'
30+
uses: './.github/actions/setup'
31+
32+
- name: 'Execute the test script'
33+
run: 'npm run test'
34+
35+
bundle:
36+
name: 'Bundle package with Rollup.js'
37+
runs-on: 'ubuntu-latest'
38+
steps:
39+
- name: 'Checkout the repository'
40+
uses: 'actions/checkout@v3'
41+
42+
- name: 'Setup Node.js and npm'
43+
uses: './.github/actions/setup'
44+
45+
- name: 'Execute the build script'
46+
run: 'npm run build'

‎.gitignore

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Unversioned files and folders.
2+
# References at https://git-scm.com/docs/gitignore.
3+
4+
# Finder's configuration files (Mac).
5+
.DS_Store
6+
7+
# Node.js modules.
8+
node_modules/
9+
10+
# NPM's shrinkwrap.
11+
# We're using `package-lock.json` instead.
12+
npm-shrinkwrap.json
13+
14+
# Yarn's lockfile, Plug'n'Play, folder and settings.
15+
# We're using npm, and it provides its lockfile and settings.
16+
yarn.lock
17+
.pnp.*
18+
.yarn/
19+
.yarnrc
20+
.yarnrc.yaml
21+
22+
# pnpm's lockfile, workspace definitions and hooks.
23+
# We're using npm, and it provides its lockfile and settings.
24+
pnpm-lock.yaml
25+
pnpm-workspace.yaml
26+
pnpmfile.js
27+
28+
# Log files.
29+
*.log
30+
*.log.*

‎.prettierignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Unlinted files and folders.
2+
# References at https://prettier.io/docs/en/ignore.html#ignoring-files.
3+
4+
# Generated docs, bundles and type definitions.
5+
docs/
6+
dist/
7+
types/

‎LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) [year] [authorFullName]
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

‎README.md

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# [libraryNameWithSpacesAndUpperCases]
2+
3+
[![Continuous Integrations](https://github.com/[repositoryOwner]/[repositoryName]/actions/workflows/continuous-integrations.yaml/badge.svg?branch=main)](https://github.com/[repositoryOwner]/[repositoryName]/actions/workflows/continuous-integrations.yaml)
4+
[![Build Status](https://travis-ci.org/[repositoryOwner]/[repositoryName].svg?branch=master)](https://travis-ci.org/[repositoryOwner]/[repositoryName])
5+
[![License](https://badgen.net/github/license/[repositoryOwner]/[repositoryName])](./LICENSE)
6+
[![Library minified size](https://badgen.net/bundlephobia/min/[libraryName])](https://bundlephobia.com/result?p=[libraryName])
7+
[![Library minified + gzipped size](https://badgen.net/bundlephobia/minzip/[libraryName])](https://bundlephobia.com/result?p=[libraryName])
8+
9+
## Installation
10+
11+
This library is published in the NPM registry and can be installed using any compatible package manager.
12+
13+
```sh
14+
npm install [libraryName] --save
15+
16+
# For Yarn, use the command below.
17+
yarn add [libraryName]
18+
```
19+
20+
### Installation from CDN
21+
22+
This module has an UMD bundle available through JSDelivr and Unpkg CDNs.
23+
24+
```html
25+
<!-- For UNPKG use the code below. -->
26+
<script src="https://unpkg.com/[libraryName]"></script>
27+
28+
<!-- For JSDelivr use the code below. -->
29+
<script src="https://cdn.jsdelivr.net/npm/[libraryName]"></script>
30+
31+
<script>
32+
// UMD module is exposed through the "[libraryCamelCaseName]" global variable.
33+
console.log([libraryCamelCaseName]);
34+
</script>
35+
```
36+
37+
## Documentation
38+
39+
[Documentation generated from source files by Typedoc](./docs/README.md).
40+
41+
## License
42+
43+
Released under [MIT License](./LICENSE).

‎dist/index.cjs

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*!
2+
* [libraryName] v0.0.0
3+
* (c) [authorFullName]
4+
* Released under the MIT License.
5+
*/
6+
7+
'use strict';
8+
9+
Object.defineProperty(exports, '__esModule', { value: true });
10+
11+
/**
12+
* Check if value is parseable to number.
13+
* @example
14+
* ```js
15+
* isNumberParseable('AAAA');
16+
* //=> false
17+
*
18+
* isNumberParseable('100');
19+
* //=> true
20+
*
21+
* if (!isNumberParseable(value))
22+
* throw new Error('Value can\'t be parseable to `Number`.')
23+
* return Number(value);
24+
* ```
25+
* @param value - An `unknown` value to be checked.
26+
*/
27+
var isNumberParseable = function (value) {
28+
return !Number.isNaN(Number(value));
29+
};
30+
31+
exports.isNumberParseable = isNumberParseable;
32+
//# sourceMappingURL=index.cjs.map

‎dist/index.cjs.map

+1
Original file line numberDiff line numberDiff line change

‎dist/index.esm.js

+28
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/index.esm.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/index.js

+32
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/index.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/index.mjs

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*!
2+
* [libraryName] v0.0.0
3+
* (c) [authorFullName]
4+
* Released under the MIT License.
5+
*/
6+
7+
/**
8+
* Check if value is parseable to number.
9+
* @example
10+
* ```js
11+
* isNumberParseable('AAAA');
12+
* //=> false
13+
*
14+
* isNumberParseable('100');
15+
* //=> true
16+
*
17+
* if (!isNumberParseable(value))
18+
* throw new Error('Value can\'t be parseable to `Number`.')
19+
* return Number(value);
20+
* ```
21+
* @param value - An `unknown` value to be checked.
22+
*/
23+
var isNumberParseable = function (value) {
24+
return !Number.isNaN(Number(value));
25+
};
26+
27+
export { isNumberParseable };
28+
//# sourceMappingURL=index.mjs.map

‎dist/index.mjs.map

+1
Original file line numberDiff line numberDiff line change

0 commit comments

Comments
 (0)