@8ms/helpers 1.0.5 → 1.0.6

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.
@@ -1,3 +1,4 @@
1
1
  import { AuthState } from './constants';
2
+ import isSessionReady from './isSessionReady';
2
3
  export type {};
3
- export { AuthState, };
4
+ export { AuthState, isSessionReady, };
@@ -1,5 +1,10 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AuthState = void 0;
6
+ exports.isSessionReady = exports.AuthState = void 0;
4
7
  var constants_1 = require("./constants");
5
8
  Object.defineProperty(exports, "AuthState", { enumerable: true, get: function () { return constants_1.AuthState; } });
9
+ var isSessionReady_1 = __importDefault(require("./isSessionReady"));
10
+ exports.isSessionReady = isSessionReady_1.default;
@@ -0,0 +1,4 @@
1
+ declare const isSessionReady: ({ session }: {
2
+ session: any;
3
+ }) => boolean;
4
+ export default isSessionReady;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var isSessionReady = function (_a) {
4
+ var session = _a.session;
5
+ var response = false;
6
+ if (undefined !== session && null !== session) {
7
+ if (undefined !== session.user && null !== session.user) {
8
+ response = true;
9
+ }
10
+ }
11
+ return response;
12
+ };
13
+ exports.default = isSessionReady;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@8ms/helpers",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/8millionstories-organisation/8ms-helpers-ts.git"