@bigbinary/neeto-commons-frontend 2.1.32 → 2.1.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/utils.d.ts CHANGED
@@ -422,6 +422,18 @@ export function getFromLocalStorage<T extends object>(key: string): T | null;
422
422
  * @endexample
423
423
  */
424
424
  export function setToLocalStorage(key: string, value: any): void;
425
+ /**
426
+ *
427
+ * The removeFromLocalStorage function takes a key as its parameter, and will
428
+ *
429
+ * remove that key from the given Storage object if it exists.
430
+ *
431
+ * @example
432
+ *
433
+ * removeFromLocalStorage("token");
434
+ * @endexample
435
+ */
436
+ export function removeFromLocalStorage(key: string): void;
425
437
  type CurrencyFormatterFunction = (amount: number | string, currency: string, options?: Intl.NumberFormatOptions) => string;
426
438
  /**
427
439
  *
package/utils.js CHANGED
@@ -2648,6 +2648,9 @@ var getFromLocalStorage = function getFromLocalStorage(key) {
2648
2648
  var setToLocalStorage = function setToLocalStorage(key, value) {
2649
2649
  if (isNotNil(value)) localStorage.setItem(key, JSON.stringify(value));else localStorage.removeItem(key);
2650
2650
  };
2651
+ var removeFromLocalStorage = function removeFromLocalStorage(key) {
2652
+ localStorage.removeItem(key);
2653
+ };
2651
2654
 
2652
2655
  dayjs.extend(relativeTime);
2653
2656
  dayjs.extend(updateLocale);
@@ -3265,5 +3268,5 @@ var currencyFormat = {
3265
3268
  } // 1000, "INR", { maximumFractionDigits: 0 } => ₹1,000 INR
3266
3269
  };
3267
3270
 
3268
- export { buildUrl, copyToClipboard, createSubscription, currencyFormat, dateFormat, debounce, getFromLocalStorage, getQueryParams, getSubdomain, hasAllPermissions, hasAnyPermission, hasPermission, joinHyphenCase, resetAuthTokens, setToLocalStorage, simulateApiCall, timeFormat, toLocale, withEventTargetValue };
3271
+ export { buildUrl, copyToClipboard, createSubscription, currencyFormat, dateFormat, debounce, getFromLocalStorage, getQueryParams, getSubdomain, hasAllPermissions, hasAnyPermission, hasPermission, joinHyphenCase, removeFromLocalStorage, resetAuthTokens, setToLocalStorage, simulateApiCall, timeFormat, toLocale, withEventTargetValue };
3269
3272
  //# sourceMappingURL=utils.js.map