@pnp/core
Advanced tools
Comparing version 3.0.0-v3nightly.20220014 to 3.0.0-v3nightly.20220017
@@ -1,2 +0,2 @@ | ||
import { getGUID, isFunc } from "./util.js"; | ||
import { getGUID, isArray, isFunc } from "./util.js"; | ||
let _enableExtensions = false; | ||
@@ -84,3 +84,3 @@ const ObjExtensionsSym = Symbol.for("PnPExt"); | ||
function extendCol(a, e) { | ||
if (Array.isArray(e)) { | ||
if (isArray(e)) { | ||
a.push(...e); | ||
@@ -87,0 +87,0 @@ } |
{ | ||
"name": "@pnp/core", | ||
"version": "3.0.0-v3nightly.20220014", | ||
"version": "3.0.0-v3nightly.20220017", | ||
"description": "pnp - provides shared functionality across all pnp libraries", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
@@ -37,12 +37,7 @@ export declare type DateAddInterval = "year" | "quarter" | "month" | "week" | "day" | "hour" | "minute" | "second"; | ||
*/ | ||
export declare function isFunc(f: any): boolean; | ||
export declare function isFunc(f: any): f is Function; | ||
/** | ||
* Determines if an object is both defined and not null | ||
* @param obj Object to test | ||
*/ | ||
export declare function objectDefinedNotNull(obj: any): boolean; | ||
/** | ||
* @returns whether the provided parameter is a JavaScript Array or not. | ||
*/ | ||
export declare function isArray(array: any): boolean; | ||
export declare function isArray(array: any): array is any[]; | ||
/** | ||
@@ -61,2 +56,7 @@ * Determines if a given url is absolute | ||
/** | ||
* Determines if an object is both defined and not null | ||
* @param obj Object to test | ||
*/ | ||
export declare function objectDefinedNotNull(obj: any): boolean; | ||
/** | ||
* Shorthand for JSON.stringify | ||
@@ -63,0 +63,0 @@ * |
15
util.js
@@ -89,2 +89,3 @@ /** | ||
*/ | ||
// eslint-disable-next-line @typescript-eslint/ban-types | ||
export function isFunc(f) { | ||
@@ -94,9 +95,2 @@ return typeof f === "function"; | ||
/** | ||
* Determines if an object is both defined and not null | ||
* @param obj Object to test | ||
*/ | ||
export function objectDefinedNotNull(obj) { | ||
return typeof obj !== "undefined" && obj !== null; | ||
} | ||
/** | ||
* @returns whether the provided parameter is a JavaScript Array or not. | ||
@@ -124,2 +118,9 @@ */ | ||
/** | ||
* Determines if an object is both defined and not null | ||
* @param obj Object to test | ||
*/ | ||
export function objectDefinedNotNull(obj) { | ||
return typeof obj !== "undefined" && obj !== null; | ||
} | ||
/** | ||
* Shorthand for JSON.stringify | ||
@@ -126,0 +127,0 @@ * |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
75276
1201