open-collaboration-protocol
Version:
Open Collaboration Protocol implementation, part of the Open Collaboration Tools project
24 lines • 792 B
JavaScript
// ******************************************************************************
// Copyright 2024 TypeFox GmbH
// This program and the accompanying materials are made available under the
// terms of the MIT License, which is available in the project root.
// ******************************************************************************
export function isObject(value) {
return typeof value === 'object' && value !== null;
}
export function isArray(value, test) {
if (!Array.isArray(value)) {
return false;
}
if (test) {
return value.every(test);
}
return true;
}
export function isStringArray(value) {
return isArray(value, isString);
}
export function isString(value) {
return typeof value === 'string';
}
//# sourceMappingURL=types.js.map