@smoxy-io/js-utils 1.0.0 → 1.2.0

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/classes/config.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import {isBoolean, isEqual, isFunction, isPlainObject, isString, merge} from 'lodash';
2
- import {plain} from '../lib/object';
2
+ import {plain} from '../lib/object.js';
3
3
  import {has} from 'lodash/object';
4
4
 
5
5
  const defaultProps = {};
package/classes/env.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {isEqual, isFunction, isPlainObject, merge} from 'lodash';
2
- import {plain} from '../lib/object';
3
- import {isAsync} from '../lib/function';
2
+ import {plain} from '../lib/object.js';
3
+ import {isAsync} from '../lib/function.js';
4
4
 
5
5
  export const WindowLocation = 'windowLocation';
6
6
  export const ParentWindowLocation = 'parentWindowLocation';
@@ -0,0 +1,6 @@
1
+
2
+ export * from './config.js';
3
+ export * from './env.js';
4
+ export * from './fetch.js';
5
+ export * from './session.js';
6
+ export * from './session/index.js';
@@ -0,0 +1,2 @@
1
+
2
+ export * from './jwt.js';
@@ -1,7 +1,7 @@
1
1
  import {isNumber, isPlainObject, merge} from 'lodash';
2
2
  import {plain} from '../../lib/object';
3
3
  import {isAsync} from '../../lib/function';
4
- import {Session} from '../session';
4
+ import {Session} from '../session.js';
5
5
  import {decodeToken} from '../../lib/jwt';
6
6
 
7
7
  const defaultProps = {
@@ -1,5 +1,5 @@
1
1
  import {isPlainObject, merge} from 'lodash';
2
- import {plain} from '../lib/object';
2
+ import {plain} from '../lib/object.js';
3
3
 
4
4
  const defaultProps = {
5
5
  sid: ''
package/index.js ADDED
@@ -0,0 +1,14 @@
1
+
2
+ import * as classes from './classes/index.js';
3
+ import * as lib from './lib/index.js';
4
+
5
+ import {name, license, repository, version} from './package.json' with {type: 'json'};
6
+
7
+ export {
8
+ classes,
9
+ lib,
10
+ license,
11
+ name,
12
+ repository,
13
+ version
14
+ };
package/lib/iframe.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import FrameBus from 'framebus';
2
2
  import {isPlainObject, merge} from 'lodash';
3
- import {mergeEnv, ParentWindowLocation} from '../classes/env';
4
- import {mergeConfig} from '../classes/config';
3
+ import {mergeEnv, ParentWindowLocation} from '../classes/env.js';
4
+ import {mergeConfig} from '../classes/config.js';
5
5
 
6
6
  export const init = () => {
7
7
  if (window.parent === window) {
package/lib/index.js ADDED
@@ -0,0 +1,10 @@
1
+
2
+ export * from './function.js';
3
+ export * from './iframe.js';
4
+ export * from './jwt.js';
5
+ export * from './numbers.js';
6
+ export * from './object.js';
7
+ export * from './promise.js';
8
+ export * from './string.js';
9
+ export * from './styles.js';
10
+ export * from './time.js';
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@smoxy-io/js-utils",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
+ "type": "module",
4
5
  "repository": {
5
6
  "type": "git",
6
7
  "url": "https://github.com/smoxy-io/js-utils.git"
@@ -10,5 +11,13 @@
10
11
  "framebus": "^6.0.3",
11
12
  "jwt-decode": "^4.0.0",
12
13
  "lodash": "^4.17.21"
14
+ },
15
+ "exports": {
16
+ ".": "./index.js",
17
+ "./classes": "./classes/index.js",
18
+ "./lib": "./lib/index.js",
19
+ "./lib/*": "./lib/*.js",
20
+ "./classes/session/*": "./classes/session/*.js",
21
+ "./classes/*": "./classes/*.js"
13
22
  }
14
23
  }