Skip to content

Commit 4294b3f

Browse files
committed
Fix from the refactor where namespaces were removed
1 parent 928bc8b commit 4294b3f

File tree

5 files changed

+16
-8
lines changed

5 files changed

+16
-8
lines changed

dist/jpack.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@htmlguyllc/jpack",
3-
"version": "4.1.14",
3+
"version": "4.1.15",
44
"description": "Core Javascript Library of Everyday Objects, Events, and Utilities",
55
"keywords": [
66
"javascript",

src/jpack.compiled.js

Lines changed: 7 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/jpack.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ import {strings} from "../es/strings";
88
import {type_checks} from "../es/type_checks";
99
import {User} from "../es/user";
1010

11+
//create an array of all components
12+
const components = [dom, events, XHRForm, FormFromURL, navigation, request, Site, strings, type_checks, User];
13+
1114
/**
1215
* Call this function to tie all jpack components directly to the window for global use
1316
*
@@ -28,7 +31,7 @@ const setGlobal = function(namespace){
2831
namespace = typeof namespace === 'string' ? namespace : null;
2932

3033
//loop through components, objects, plugin_wrappers, and utilities
31-
[components,objects,plugin_wrappers,utilities].forEach(function(object){
34+
components.forEach(function(object){
3235
//for each component within those
3336
for (var property in object) {
3437
//get actual properties
@@ -46,7 +49,8 @@ const setGlobal = function(namespace){
4649
});
4750
};
4851

49-
export const jpack = {dom, events, XHRForm, FormFromURL, navigation, request, Site, strings, type_checks, User, setGlobal: setGlobal};
52+
//extend components to include the setGlobal method
53+
export const jpack = {...components, ...{setGlobal: setGlobal}};
5054

5155
//set jpack globally so that it can be used anywhere
5256
global.jpack = jpack;

0 commit comments

Comments
 (0)