Comparing version 3.5.14 to 3.5.15
@@ -5,2 +5,7 @@ # Changelog | ||
## [3.5.15][] - 2021-09-23 | ||
- Fixed Pool infinite loop case | ||
- Add simple `fetch` API implementation | ||
## [3.5.14][] - 2021-09-21 | ||
@@ -117,3 +122,4 @@ | ||
[unreleased]: https://github.com/metarhia/metautil/compare/v3.5.14....HEAD | ||
[unreleased]: https://github.com/metarhia/metautil/compare/v3.5.15....HEAD | ||
[3.5.15]: https://github.com/metarhia/metautil/compare/v3.5.14...v3.5.15 | ||
[3.5.14]: https://github.com/metarhia/metautil/compare/v3.5.13...v3.5.14 | ||
@@ -120,0 +126,0 @@ [3.5.13]: https://github.com/metarhia/metautil/compare/v3.5.12...v3.5.13 |
@@ -33,4 +33,4 @@ 'use strict'; | ||
this.current++; | ||
if (this.current === this.size) this.current = 0; | ||
} while (!item || !free); | ||
if (this.current === this.size) this.current = 0; | ||
return item; | ||
@@ -37,0 +37,0 @@ } |
@@ -104,1 +104,3 @@ import { EventEmitter } from 'events'; | ||
} | ||
export function fetch(url: string): Promise<string>; |
'use strict'; | ||
const utilities = require('./lib/utilities.js'); | ||
const crypto = require('./lib/crypto.js'); | ||
const async = require('./lib/async.js'); | ||
const semaphore = require('./lib/semaphore.js'); | ||
const pool = require('./lib/pool.js'); | ||
module.exports = { ...utilities, ...crypto, ...semaphore, ...pool, ...async }; | ||
module.exports = { | ||
...require('./lib/utilities.js'), | ||
...require('./lib/crypto.js'), | ||
...require('./lib/semaphore.js'), | ||
...require('./lib/pool.js'), | ||
...require('./lib/async.js'), | ||
...require('./lib/fetch.js'), | ||
}; |
{ | ||
"name": "metautil", | ||
"version": "3.5.14", | ||
"version": "3.5.15", | ||
"author": "Timur Shemsedinov <timur.shemsedinov@gmail.com>", | ||
@@ -41,3 +41,3 @@ "license": "MIT", | ||
"devDependencies": { | ||
"@types/node": "^16.9.1", | ||
"@types/node": "^16.9.6", | ||
"eslint": "^7.32.0", | ||
@@ -49,5 +49,5 @@ "eslint-config-metarhia": "^7.0.1", | ||
"metatests": "^0.7.2", | ||
"prettier": "^2.4.0", | ||
"prettier": "^2.4.1", | ||
"typescript": "^4.4.3" | ||
} | ||
} |
@@ -19,4 +19,2 @@ # Metarhia utilities | ||
- `sample(arr: Array<any>): any` | ||
- `ipToInt(ip?: string): number` | ||
- `parseHost(host?: string): string` | ||
- `parseParams(params: string): object` | ||
@@ -39,3 +37,2 @@ - `replace(str: string, substr: string, newstr: string): string` | ||
- `protect(allowMixins: Array<string>, ...namespaces: Array<object>): void` | ||
- `parseCookies(cookie: string): object` | ||
- `createAbortController(): AbortController` | ||
@@ -45,2 +42,9 @@ - `timeout(msec: number, signal?: EventEmitter): Promise<void>` | ||
## Network utilities | ||
- `ipToInt(ip?: string): number` | ||
- `parseHost(host?: string): string` | ||
- `parseCookies(cookie: string): object` | ||
- `fetch(url: string): Promise<string>` | ||
## Crypto utilities | ||
@@ -47,0 +51,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 3 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29459
12
672
79
3