azure-devops-ui
Version:
React components for building web UI in Azure DevOps
1 lines • 590 B
JavaScript
const CURRENT_ID_PROPERTY="__currentIdProp__",DEFAULT_ID_STRING="id__",global="undefined"!=typeof window&&window||process;function checkProperties(e,r){for(const o in e)if(e.hasOwnProperty(o)&&(!r.hasOwnProperty(o)||r[o]!==e[o]))return!1;return!0}function getId(e){var r=global[CURRENT_ID_PROPERTY]++;return(e||DEFAULT_ID_STRING)+r}function resetIds(e=0){global[CURRENT_ID_PROPERTY]=e}function shallowCompare(e,r){return e===r||!(!e||!r)&&checkProperties(e,r)&&checkProperties(r,e)}void 0===global[CURRENT_ID_PROPERTY]&&(global[CURRENT_ID_PROPERTY]=0);export{getId,resetIds,shallowCompare};