javascript namespace library
Revisión | 1c3b9bb66f953b2e6fa13e6aace332343e026a35 (tree) |
---|---|
Tiempo | 2019-08-07 12:06:50 |
Autor | frostbane <frostbane@prog...> |
Commiter | frostbane |
与 feature/comments 合并
@@ -1,3 +1,20 @@ | ||
1 | +/* jshint | |
2 | +forin: false, | |
3 | +nonew: false, | |
4 | +proto: true, | |
5 | +maxlen: 180 | |
6 | + */ | |
7 | + | |
8 | +/* global | |
9 | +root, | |
10 | +window, | |
11 | +Promise, | |
12 | +$, | |
13 | +$$, | |
14 | +exports, | |
15 | +module | |
16 | + */ | |
17 | + | |
1 | 18 | /*! |
2 | 19 | .. ┌ -: . |
3 | 20 | ([]▄▄├]▄▄▄¿┐`, |
@@ -35,23 +52,6 @@ | ||
35 | 52 | |
36 | 53 | –––––––––––––––––––––––––––––––––––––––––––––––––– */ |
37 | 54 | |
38 | - | |
39 | -/* jshint | |
40 | -forin: false, | |
41 | -nonew: false, | |
42 | -proto: true | |
43 | - */ | |
44 | - | |
45 | -/* global | |
46 | -root, | |
47 | -window, | |
48 | -Promise, | |
49 | -$, | |
50 | -$$, | |
51 | -exports, | |
52 | -module | |
53 | - */ | |
54 | - | |
55 | 55 | (function(global, factory){ |
56 | 56 | "use strict"; |
57 | 57 |
@@ -125,7 +125,7 @@ | ||
125 | 125 | * |
126 | 126 | * @param {String} name |
127 | 127 | * @param {Object} [obj] |
128 | - * @param {Function} [init] | |
128 | + * @param {Function} [init] constructor | |
129 | 129 | * |
130 | 130 | * @returns {Object} |
131 | 131 | * |
@@ -143,16 +143,15 @@ | ||
143 | 143 | |
144 | 144 | var nsObjCopy = copyPublicProp(nsObj, obj); |
145 | 145 | |
146 | - if(typeof init === typeof function(){}){ | |
146 | + if(typeof init === typeof function(){}) | |
147 | 147 | init.apply(nsObjCopy); |
148 | - } | |
149 | 148 | |
150 | 149 | return nsObjCopy; |
151 | 150 | |
152 | 151 | }; |
153 | 152 | |
154 | 153 | |
155 | - namespace.version = "0.2.0.0"; | |
154 | + namespace.version = "0.2.0.1"; | |
156 | 155 | |
157 | 156 | return namespace; |
158 | 157 |
@@ -1,6 +1,6 @@ | ||
1 | 1 | { |
2 | 2 | "name" : "micro-namespace", |
3 | - "version" : "v0.2.0", | |
3 | + "version" : "v0.2.1", | |
4 | 4 | "description" : "Wrap object into a namespace", |
5 | 5 | "repository" : { |
6 | 6 | "type": "mercurial", |