UNPKG

@bitrix24/b24jssdk

Version:

Bitrix24 REST API JavaScript SDK

34 lines (32 loc) • 1.01 kB
/** * @package @bitrix24/b24jssdk * @version 3.0.0 * @copyright (c) 2026 Bitrix24 * @license MIT * @see https://github.com/bitrix24/b24jssdk * @see https://bitrix24.github.io/b24jssdk/ */ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); const EMPTY = Object.freeze({}); function isPlainObject(value) { return "object" === typeof value && null !== value && !Array.isArray(value); } __name(isPlainObject, "isPlainObject"); function normalisePlacementOptions(raw) { try { if (isPlainObject(raw)) { return Object.freeze({ ...raw }); } if ("string" === typeof raw && raw.length > 0) { const parsed = JSON.parse(raw); return isPlainObject(parsed) ? Object.freeze({ ...parsed }) : EMPTY; } } catch { return EMPTY; } return EMPTY; } __name(normalisePlacementOptions, "normalisePlacementOptions"); export { normalisePlacementOptions }; //# sourceMappingURL=_placement-options.mjs.map