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

@scalecube/utils

Package Overview
Dependencies
Maintainers
7
Versions
188
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@scalecube/utils - npm Package Compare versions

Comparing version 0.0.2-snapshot.1565182903.6 to 0.0.2-snapshot.1565528584.2

2

es/check.d.ts

@@ -19,4 +19,6 @@ declare type Collection<T> = T[] | {

export declare const isFunction: (val: any) => boolean;
export declare const isFunctionConstructor: (val: any) => boolean;
export declare const assertFunction: (val: any, msg?: string) => void;
export declare const assertClass: (val: any, msg?: string) => void;
export declare const assertNumber: (val: any, msg?: string) => void;
export {};

@@ -50,3 +50,8 @@ var assert = function (predicate, msg) {

};
var isFunction = function (val) { return typeof val === 'function'; };
var isFunction = function (val) {
return typeof val === 'function' && !/^class\s/.test(Function.prototype.toString.call(val));
};
var isFunctionConstructor = function (val) {
return typeof val === 'function' && /^class\s/.test(Function.prototype.toString.call(val));
};
var assertFunction = function (val, msg) {

@@ -56,2 +61,6 @@ if (msg === void 0) { msg = 'Expected to be a function'; }

};
var assertClass = function (val, msg) {
if (msg === void 0) { msg = 'Expected to be a class'; }
assert(isFunctionConstructor(val), msg);
};
var assertNumber = function (val, msg) {

@@ -78,3 +87,5 @@ if (msg === void 0) { msg = 'Expected to be a number'; }

isFunction: isFunction,
isFunctionConstructor: isFunctionConstructor,
assertFunction: assertFunction,
assertClass: assertClass,
assertNumber: assertNumber

@@ -81,0 +92,0 @@ });

@@ -19,4 +19,6 @@ declare type Collection<T> = T[] | {

export declare const isFunction: (val: any) => boolean;
export declare const isFunctionConstructor: (val: any) => boolean;
export declare const assertFunction: (val: any, msg?: string) => void;
export declare const assertClass: (val: any, msg?: string) => void;
export declare const assertNumber: (val: any, msg?: string) => void;
export {};

@@ -54,3 +54,8 @@ 'use strict';

};
var isFunction = function (val) { return typeof val === 'function'; };
var isFunction = function (val) {
return typeof val === 'function' && !/^class\s/.test(Function.prototype.toString.call(val));
};
var isFunctionConstructor = function (val) {
return typeof val === 'function' && /^class\s/.test(Function.prototype.toString.call(val));
};
var assertFunction = function (val, msg) {

@@ -60,2 +65,6 @@ if (msg === void 0) { msg = 'Expected to be a function'; }

};
var assertClass = function (val, msg) {
if (msg === void 0) { msg = 'Expected to be a class'; }
assert(isFunctionConstructor(val), msg);
};
var assertNumber = function (val, msg) {

@@ -82,3 +91,5 @@ if (msg === void 0) { msg = 'Expected to be a number'; }

isFunction: isFunction,
isFunctionConstructor: isFunctionConstructor,
assertFunction: assertFunction,
assertClass: assertClass,
assertNumber: assertNumber

@@ -85,0 +96,0 @@ });

6

package.json
{
"name": "@scalecube/utils",
"version": "0.0.2-snapshot.1565182903.6+f2519be",
"version": "0.0.2-snapshot.1565528584.2+01f7c6f",
"private": false,

@@ -38,5 +38,5 @@ "main": "lib/index.js",

"dependencies": {
"@scalecube/api": "^0.0.2-snapshot.1565182903.6+f2519be"
"@scalecube/api": "^0.0.2-snapshot.1565528584.2+01f7c6f"
},
"gitHead": "f2519bef1345a6600fe69fc5cf0d2c2fc77cadc1"
"gitHead": "01f7c6fde36ff738b07fb63345feed37706cf74d"
}
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