Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

metautil

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metautil - npm Package Compare versions

Comparing version 3.5.5 to 3.5.6

metautil.d.ts

8

CHANGELOG.md

@@ -5,2 +5,7 @@ # Changelog

## [3.5.6][] - 2021-07-18
- Move types to package root
- Publish signatures in README.md
## [3.5.5][] - 2021-07-09

@@ -73,3 +78,4 @@

[unreleased]: https://github.com/metarhia/metautil/compare/v3.5.5...HEAD
[unreleased]: https://github.com/metarhia/metautil/compare/v3.5.6...HEAD
[3.5.6]: https://github.com/metarhia/metautil/compare/v3.5.5...v3.5.6
[3.5.5]: https://github.com/metarhia/metautil/compare/v3.5.4...v3.5.5

@@ -76,0 +82,0 @@ [3.5.4]: https://github.com/metarhia/metautil/compare/v3.5.3...v3.5.4

12

package.json
{
"name": "metautil",
"version": "3.5.5",
"version": "3.5.6",
"author": "Timur Shemsedinov <timur.shemsedinov@gmail.com>",

@@ -13,6 +13,6 @@ "license": "MIT",

"main": "metautil.js",
"types": "types/metautil.d.ts",
"types": "metautil.d.ts",
"files": [
"lib/",
"types/"
"metautil.d.ts"
],

@@ -37,3 +37,3 @@ "engines": {

"test": "npm run lint && npm run types && metatests test/",
"types": "tsc -p types/tsconfig.json",
"types": "tsc -p tsconfig.json",
"lint": "eslint . && prettier --check \"**/*.js\" \"**/*.json\" \"**/*.md\" \"**/.*rc\" \"**/*.ts\"",

@@ -43,4 +43,4 @@ "fmt": "prettier --write \"**/*.js\" \"**/*.json\" \"**/*.md\" \"**/.*rc\" \"**/*.ts\""

"devDependencies": {
"@types/node": "^16.3.0",
"eslint": "^7.30.0",
"@types/node": "^16.3.3",
"eslint": "^7.31.0",
"eslint-config-metarhia": "^7.0.1",

@@ -47,0 +47,0 @@ "eslint-config-prettier": "^8.3.0",

@@ -10,4 +10,49 @@ # Metarhia utilities

## Contributors
## Usage
See github for full [contributors list](https://github.com/metarhia/metautil/graphs/contributors)
- Install: `npm install metautil`
- Require: `const metautil = require('metautil');`
## Common utilities
- `random(min: number, max?: number): number`
- `sample(arr: Array<any>): any`
- `ipToInt(ip?: string): number`
- `parseHost(host?: string): string`
- `parseParams(params: string): object`
- `replace(str: string, substr: string, newstr: string): string`
- `split(s: string, separator: string): [string, string]`
- `fileExt(fileName: string): string`
- `between(s: string, prefix: string, suffix: string): string`
- `isFirstUpper(s: string): boolean`
- `toLowerCamel(s: string): string`
- `toUpperCamel(s: string): string`
- `isConstant(s: string): boolean`
- `nowDate(date?: Date): string`
- `duration(s: string | number): number`
- `makePrivate(instance: object): object`
- `protect(allowMixins: Array<string>, ...namespaces: Array<object>): void`
- `parseCookies(cookie: string): object`
- `createAbortController(): AbortController`
- `timeout(msec: number, signal?: EventEmitter): Promise<void>`
- `delay(msec: number, signal?: EventEmitter): Promise<void>`
## Crypto utilities
- `cryptoRandom(): number`
- `generateKey(length: number, possible: string): string`
- `crcToken(secret: string, key: string): string`
- `generateToken(secret: string, characters: string, length: number): string`
- `validateToken(secret: string, token: string): boolean`
- `hashPassword(password: string): Promise<string>`
- `validatePassword(password: string, serHash: string): Promise<boolean>`
## Async abstractions
- `new Semaphore(concurrency: number, size?: number, timeout?: number)`
## License & Contributors
Copyright (c) 2017-2021 [Metarhia contributors](https://github.com/metarhia/metautil/graphs/contributors).
Metautil is [MIT licensed](./LICENSE).\
Metautil is a part of [Metarhia](https://github.com/metarhia) technology stack.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc