Last active
February 25, 2018 10:35
-
-
Save nefarioustim/f2db52672ca0ef7f6816d2abcc96ca44 to your computer and use it in GitHub Desktop.
Revisions
-
nefarioustim revised this gist
Feb 25, 2018 . 1 changed file with 19 additions and 14 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,19 +1,24 @@ /* jshint esnext: true */ (function (){ "use strict"; let NEF = window.NEF || {}; NEF.namespace = function() { let ln = arguments.length, i, value, x, xln, parts, object; for (i = 0; i < ln; i++) { value = arguments[i]; parts = value.split("."); object = window[parts[0]] = Object(window[parts[0]]); for (x = 1, xln = parts.length; x < xln; x++) { object = object[parts[x]] = Object(object[parts[x]]); } } return object; }; NEF.ns = NEF.namespace; window.NEF = NEF; })(); -
nefarioustim revised this gist
Feb 25, 2018 . 1 changed file with 4 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,14 @@ /* jshint esnext: true */ let NEF = {}; NEF.namespace = function() { let ln = arguments.length, i, value, x, xln, parts, object; for (i = 0; i < ln; i++) { value = arguments[i]; parts = value.split("."); object = window[parts[0]] = Object(window[parts[0]]); for (x = 1, xln = parts.length; x < xln; x++) { object = object[parts[x]] = Object(object[parts[x]]); } -
nefarioustim created this gist
Feb 25, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ let NEF = {}; NEF.namespace = function() { let ln = arguments.length, i, value, split, x, xln, parts, object; for (i = 0; i < ln; i++) { value = arguments[i]; parts = value.split("."); object = window[parts[0]] = Object(window[parts[0]]); for (x = 1, xln = parts.length; x < xln; x++) { object = object[parts[x]] = Object(object[parts[x]]); } } return object; }; NEF.ns = NEF.namespace;