Skip to content

Commit 493a8f9

Browse files
committed
Versdion 3.5.6
PR-URL: #52
1 parent 45c98ee commit 493a8f9

4 files changed

Lines changed: 69 additions & 20 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
## [Unreleased][unreleased]
44

5+
## [3.5.6][] - 2021-07-18
6+
57
- Move types to package root
8+
- Publish signatures in README.md
69

710
## [3.5.5][] - 2021-07-09
811

@@ -71,7 +74,8 @@
7174
See this link for 2.2.0 and all previous versions:
7275
https://github.com/metarhia/common/blob/master/CHANGELOG.md
7376

74-
[unreleased]: https://github.com/metarhia/metautil/compare/v3.5.5...HEAD
77+
[unreleased]: https://github.com/metarhia/metautil/compare/v3.5.6...HEAD
78+
[3.5.6]: https://github.com/metarhia/metautil/compare/v3.5.5...v3.5.6
7579
[3.5.5]: https://github.com/metarhia/metautil/compare/v3.5.4...v3.5.5
7680
[3.5.4]: https://github.com/metarhia/metautil/compare/v3.5.3...v3.5.4
7781
[3.5.3]: https://github.com/metarhia/metautil/compare/v3.5.2...v3.5.3

README.md

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,51 @@
77
[![npm downloads](https://img.shields.io/npm/dt/metautil.svg)](https://www.npmjs.com/package/metautil)
88
[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/metarhia/metautil/blob/master/LICENSE)
99

10-
## Contributors
10+
## Usage
1111

12-
See github for full [contributors list](https://github.com/metarhia/metautil/graphs/contributors)
12+
- Install: `npm install metautil`
13+
- Require: `const metautil = require('metautil');`
14+
15+
## Common utilities
16+
17+
- `random(min: number, max?: number): number`
18+
- `sample(arr: Array<any>): any`
19+
- `ipToInt(ip?: string): number`
20+
- `parseHost(host?: string): string`
21+
- `parseParams(params: string): object`
22+
- `replace(str: string, substr: string, newstr: string): string`
23+
- `split(s: string, separator: string): [string, string]`
24+
- `fileExt(fileName: string): string`
25+
- `between(s: string, prefix: string, suffix: string): string`
26+
- `isFirstUpper(s: string): boolean`
27+
- `toLowerCamel(s: string): string`
28+
- `toUpperCamel(s: string): string`
29+
- `isConstant(s: string): boolean`
30+
- `nowDate(date?: Date): string`
31+
- `duration(s: string | number): number`
32+
- `makePrivate(instance: object): object`
33+
- `protect(allowMixins: Array<string>, ...namespaces: Array<object>): void`
34+
- `parseCookies(cookie: string): object`
35+
- `createAbortController(): AbortController`
36+
- `timeout(msec: number, signal?: EventEmitter): Promise<void>`
37+
- `delay(msec: number, signal?: EventEmitter): Promise<void>`
38+
39+
## Crypto utilities
40+
41+
- `cryptoRandom(): number`
42+
- `generateKey(length: number, possible: string): string`
43+
- `crcToken(secret: string, key: string): string`
44+
- `generateToken(secret: string, characters: string, length: number): string`
45+
- `validateToken(secret: string, token: string): boolean`
46+
- `hashPassword(password: string): Promise<string>`
47+
- `validatePassword(password: string, serHash: string): Promise<boolean>`
48+
49+
## Async abstractions
50+
51+
- `new Semaphore(concurrency: number, size?: number, timeout?: number)`
52+
53+
## License & Contributors
54+
55+
Copyright (c) 2017-2021 [Metarhia contributors](https://github.com/metarhia/metautil/graphs/contributors).
56+
Metautil is [MIT licensed](./LICENSE).\
57+
Metautil is a part of [Metarhia](https://github.com/metarhia) technology stack.

package-lock.json

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "metautil",
3-
"version": "3.5.5",
3+
"version": "3.5.6",
44
"author": "Timur Shemsedinov <timur.shemsedinov@gmail.com>",
55
"license": "MIT",
66
"description": "Metarhia utilities",
@@ -38,8 +38,8 @@
3838
"fmt": "prettier --write \"**/*.js\" \"**/*.json\" \"**/*.md\" \"**/.*rc\" \"**/*.ts\""
3939
},
4040
"devDependencies": {
41-
"@types/node": "^16.3.0",
42-
"eslint": "^7.30.0",
41+
"@types/node": "^16.3.3",
42+
"eslint": "^7.31.0",
4343
"eslint-config-metarhia": "^7.0.1",
4444
"eslint-config-prettier": "^8.3.0",
4545
"eslint-plugin-import": "^2.23.4",

0 commit comments

Comments
 (0)