1 | <div align="center" style="text-align: center;">
|
2 | <h1 style="border-bottom: none;">nodemod</h1>
|
3 |
|
4 | <p>A collection of node modules for The Really Project</p>
|
5 | </div>
|
6 |
|
7 | <hr />
|
8 |
|
9 | <a href="https://www.buymeacoffee.com/RLmMhgXFb" target="_blank" rel="noopener noreferrer"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 20px !important;width: auto !important;" ></a>
|
10 | [![tippin.me][tippin-me-badge]][tippin-me-url]
|
11 | [![Follow me][follow-me-badge]][follow-me-url]
|
12 |
|
13 | [![Version][version-badge]][version-url]
|
14 | [![Node version][node-version-badge]][node-version-url]
|
15 | [![MIT License][mit-license-badge]][mit-license-url]
|
16 |
|
17 | [![Downloads][downloads-badge]][downloads-url]
|
18 | [![Total downloads][total-downloads-badge]][downloads-url]
|
19 | [![Packagephobia][packagephobia-badge]][packagephobia-url]
|
20 | [![Bundlephobia][bundlephobia-badge]][bundlephobia-url]
|
21 |
|
22 | [![ci][ga-badge]][ga-url]
|
23 | [![codecov][codecov-badge]][codecov-url]
|
24 |
|
25 | [![Code of Conduct][coc-badge]][coc-url]
|
26 |
|
27 | > Helper functions made specifically for The Really Project. All modules are shipped in [ES Modules] and users are required to create their own CJS builds if needed, or use [esm] for bundle-less module loader.
|
28 |
|
29 | ## Table of contents <!-- omit in toc -->
|
30 |
|
31 | - [Pre-requisites](#pre-requisites)
|
32 | - [Install](#install)
|
33 | - [Usage](#usage)
|
34 | - [Available modules](#available-modules)
|
35 | - [Deno equivalent](#deno-equivalent)
|
36 | - [License](#license)
|
37 |
|
38 | ## Pre-requisites
|
39 |
|
40 | - [Node.js][nodejs-url] >= 14.17.3
|
41 | - [NPM][npm-url] >= 6.14.13 ([NPM][npm-url] comes with [Node.js][nodejs-url] so there is no need to install separately.)
|
42 | - [ES Modules]
|
43 |
|
44 | ## Install
|
45 |
|
46 | ```sh
|
47 | # Install via NPM
|
48 | $ npm i nodemod
|
49 | ```
|
50 |
|
51 | ```sh
|
52 | # [OPTIONAL] Only install this as `devDependencies` if you do not use
|
53 | # any bundler or compiler for your project. Note that all modules are
|
54 | # exported using ES modules. See Usage section for more details.
|
55 | $ npm i -D esm
|
56 | ```
|
57 |
|
58 | ## Usage
|
59 |
|
60 | All modules are exported using JavaScript's ES modules. Users are recommended to use [esm] to run their scripts.
|
61 |
|
62 | ```js
|
63 | // index.js
|
64 | import { html } from 'nodemod/dist/lit-ntml/index.js';
|
65 |
|
66 | await html`<h1>Hello, World!</h1>`;
|
67 | ```
|
68 |
|
69 | ```sh
|
70 | $ node -r esm index.js # Run script with `esm` to transpile ES Modules on the fly.
|
71 | ```
|
72 |
|
73 | ## Available modules
|
74 |
|
75 | * [calendar] - Minimal module to compute a calendar
|
76 | * [deep-clone] - Simple and fast deep cloning
|
77 | * [delay-until] - A typical delay function but Promise based
|
78 | * [fetch-as] - Simple fetch helper with type resolver
|
79 | * [lit-ntml] - Expressive HTML Templates
|
80 | * [normalize-diacritics] - Remove accents/ diacritics in string
|
81 | * [polling-observer] - A new way of running polling function with observer pattern
|
82 | * [scryptify] - A stronger encryption and decryption in Node.js
|
83 | * [signatur] - Sign and unsign HTTP request with ease
|
84 | * [utc-date] - Generate UTC date with various offsets
|
85 | * [utc-time] - Generate UTC time with various offsets
|
86 |
|
87 | ## Deno equivalent
|
88 |
|
89 | Showing some ❤️ and support for [deno].
|
90 |
|
91 | * [deno_mod]
|
92 |
|
93 | ## License
|
94 |
|
95 | [MIT License](https://motss.mit-license.org/) © Rong Sen Ng
|
96 |
|
97 |
|
98 | [typescript-url]: https://github.com/Microsoft/TypeScript
|
99 | [nodejs-url]: https://nodejs.org
|
100 | [npm-url]: https://www.npmjs.com
|
101 | [node-releases-url]: https://nodejs.org/en/download/releases
|
102 | [deno]: https://github.com/denoland/deno
|
103 | [deno_mod]: https://github.com/motss/deno_mod
|
104 | [esm]: https://github.com/standard-things/esm
|
105 | [ES Modules]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
|
106 |
|
107 | [calendar]: /src/calendar
|
108 | [deep-clone]: /src/deep-clone
|
109 | [delay-until]: /src/delay-until
|
110 | [fetch-as]: /src/fetch-as
|
111 | [lit-ntml]: /src/lit-ntml
|
112 | [normalize-diacritics]: /src/normalize-diacritics
|
113 | [polling-observer]: /src/polling-observer
|
114 | [scryptify]: /src/scryptify
|
115 | [signatur]: /src/signatur
|
116 | [utc-date]: /src/utc-date
|
117 | [utc-time]: /src/utc-time
|
118 |
|
119 |
|
120 | [tippin-me-badge]: https://badgen.net/badge/%E2%9A%A1%EF%B8%8Ftippin.me/@igarshmyb/F0918E
|
121 | [follow-me-badge]: https://flat.badgen.net/twitter/follow/igarshmyb?icon=twitter
|
122 |
|
123 | [version-badge]: https://flat.badgen.net/npm/v/nodemod?icon=npm
|
124 | [node-version-badge]: https://flat.badgen.net/npm/node/nodemod
|
125 | [mit-license-badge]: https://flat.badgen.net/npm/license/nodemod
|
126 |
|
127 | [downloads-badge]: https://flat.badgen.net/npm/dm/nodemod
|
128 | [total-downloads-badge]: https://flat.badgen.net/npm/dt/nodemod?label=total%20downloads
|
129 | [packagephobia-badge]: https://flat.badgen.net/packagephobia/install/nodemod
|
130 | [bundlephobia-badge]: https://flat.badgen.net/bundlephobia/minzip/nodemod
|
131 |
|
132 | [ga-badge]: https://github.com/motss/nodemod/actions/workflows/ci.yml/badge.svg?branch=main
|
133 | [codecov-badge]: https://flat.badgen.net/codecov/c/github/motss/nodemod?label=codecov&icon=codecov
|
134 |
|
135 | [coc-badge]: https://flat.badgen.net/badge/code%20of/conduct/pink
|
136 |
|
137 |
|
138 | [tippin-me-url]: https://tippin.me/@igarshmyb
|
139 | [follow-me-url]: https://twitter.com/igarshmyb?utm_source=github.com&utm_medium=referral&utm_content=motss/app-datepicker
|
140 |
|
141 | [version-url]: https://www.npmjs.com/package/nodemod
|
142 | [node-version-url]: https://nodejs.org/en/download
|
143 | [mit-license-url]: https://github.com/motss/nodemod/blob/master/LICENSE
|
144 |
|
145 | [downloads-url]: https://www.npmtrends.com/nodemod
|
146 | [packagephobia-url]: https://packagephobia.now.sh/result?p=nodemod
|
147 | [bundlephobia-url]: https://bundlephobia.com/result?p=nodemod
|
148 |
|
149 | [ga-url]: https://github.com/motss/nodemod/actions/workflows/ci.yml
|
150 | [codecov-url]: https://codecov.io/gh/motss/nodemod
|
151 |
|
152 | [coc-url]: https://github.com/motss/nodemod/blob/master/CODE_OF_CONDUCT.md
|