@code-to-json/utils
Advanced tools
Comparing version 0.0.1 to 0.1.2
@@ -1,3 +0,6 @@ | ||
export declare function isArray(value: any): value is any[]; | ||
export declare function isHomogenousArray<T>(value: any, validator: (v: any) => v is T): value is T[]; | ||
export * from './guards'; | ||
export * from './ts-node'; | ||
export * from './ts-node-guards'; | ||
export * from './syntax'; | ||
export * from './errors'; | ||
//# sourceMappingURL=index.d.ts.map |
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
function isArray(value) { | ||
return value instanceof Array; | ||
} | ||
exports.isArray = isArray; | ||
function isHomogenousArray(value, validator) { | ||
if (!isArray(value)) | ||
return false; | ||
for (var i = 0; i < value.length; i++) { | ||
if (!validator(value[i])) | ||
return false; | ||
} | ||
return true; | ||
} | ||
exports.isHomogenousArray = isHomogenousArray; | ||
__export(require("./guards")); | ||
__export(require("./ts-node")); | ||
__export(require("./ts-node-guards")); | ||
__export(require("./syntax")); | ||
__export(require("./errors")); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@code-to-json/utils", | ||
"version": "0.0.1", | ||
"version": "0.1.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -1,14 +0,5 @@ | ||
export function isArray(value: any): value is any[] { | ||
return value instanceof Array; | ||
} | ||
export function isHomogenousArray<T>( | ||
value: any, | ||
validator: (v: any) => v is T | ||
): value is T[] { | ||
if (!isArray(value)) return false; | ||
for (let i = 0; i < value.length; i++) { | ||
if (!validator(value[i])) return false; | ||
} | ||
return true; | ||
} | ||
export * from './guards'; | ||
export * from './ts-node'; | ||
export * from './ts-node-guards'; | ||
export * from './syntax'; | ||
export * from './errors'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
21847
37
361
1