Version 3 of `@actions/cache` is now deprecated, and can cause runs to fail; see https://github.com/actions/toolkit/blob/main/packages/cache/README.md. I have no fucking clue why this was considered a major release; it's explicitly documented as being entirely backwards-compatible. SemVer be damned, amirite?
26 lines
705 B
JavaScript
26 lines
705 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.isJsonObject = exports.typeofJsonValue = void 0;
|
|
/**
|
|
* Get the type of a JSON value.
|
|
* Distinguishes between array, null and object.
|
|
*/
|
|
function typeofJsonValue(value) {
|
|
let t = typeof value;
|
|
if (t == "object") {
|
|
if (Array.isArray(value))
|
|
return "array";
|
|
if (value === null)
|
|
return "null";
|
|
}
|
|
return t;
|
|
}
|
|
exports.typeofJsonValue = typeofJsonValue;
|
|
/**
|
|
* Is this a JSON object (instead of an array or null)?
|
|
*/
|
|
function isJsonObject(value) {
|
|
return value !== null && typeof value == "object" && !Array.isArray(value);
|
|
}
|
|
exports.isJsonObject = isJsonObject;
|