Skip to content

Commit c85681f

Browse files
committed
remove old nav objects
1 parent 3c544d7 commit c85681f

File tree

2 files changed

+1
-87
lines changed

2 files changed

+1
-87
lines changed

core/lib/object_factory.js

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -124,41 +124,6 @@ Pattern.create = function (relPath, data, customProps) {
124124
return extend(newPattern, customProps);
125125
};
126126

127-
128-
var oPatternType = function (name) {
129-
this.patternTypeLC = name;
130-
this.patternTypeUC = name.split('-').reduce(function (val, working) {
131-
return val.charAt(0).toUpperCase() + val.slice(1) + ' ' + working.charAt(0).toUpperCase() + working.slice(1);
132-
}, '').trim();
133-
this.patternTypeItems = [];
134-
this.patternTypeItemsIndex = [];
135-
this.patternItems = [];
136-
this.patternItemsIndex = [];
137-
};
138-
139-
140-
var oPatternSubType = function (name) {
141-
this.patternSubtypeLC = name;
142-
this.patternSubtypeUC = name.split('-').reduce(function (val, working) {
143-
return val.charAt(0).toUpperCase() + val.slice(1) + ' ' + working.charAt(0).toUpperCase() + working.slice(1);
144-
}, '').trim();
145-
this.patternSubtypeItems = [];
146-
this.patternSubtypeItemsIndex = [];
147-
};
148-
149-
150-
var oPatternSubTypeItem = function (name) {
151-
this.patternPath = '';
152-
this.patternPartialCode = '';
153-
this.patternName = name.split(' ').reduce(function (val, working) {
154-
return val.charAt(0).toUpperCase() + val.slice(1) + ' ' + working.charAt(0).toUpperCase() + working.slice(1);
155-
}, '').trim();
156-
};
157-
158-
159127
module.exports = {
160-
Pattern: Pattern,
161-
oPatternType: oPatternType,
162-
oPatternSubType: oPatternSubType,
163-
oPatternSubTypeItem: oPatternSubTypeItem
128+
Pattern: Pattern
164129
};

test/object_factory_tests.js

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -71,55 +71,4 @@
7171
}
7272
};
7373

74-
exports['oPatternType initialization'] = {
75-
'test oPatternType initializes correctly' : function(test){
76-
var b = new of.oPatternType('test');
77-
test.equals(b.patternTypeLC, 'test');
78-
test.equals(b.patternTypeUC, 'Test');
79-
test.equals(b.patternTypeItems.length, 0);
80-
test.equals(b.patternTypeItemsIndex.length, 0);
81-
test.equals(b.patternItems.length, 0);
82-
test.equals(b.patternItemsIndex.length, 0);
83-
test.done();
84-
},
85-
'test oPatternType capitalizes patternTypeUC' : function(test){
86-
var b = new of.oPatternType('page-templates');
87-
test.equals(b.patternTypeLC, 'page-templates');
88-
test.equals(b.patternTypeUC, 'Page Templates');
89-
test.done();
90-
}
91-
};
92-
93-
exports['oPatternSubType initialization'] = {
94-
'test oPatternSubType initializes correctly' : function(test){
95-
var ni = new of.oPatternSubType('test');
96-
test.equals(ni.patternSubtypeLC, 'test');
97-
test.equals(ni.patternSubtypeUC, 'Test');
98-
test.equals(ni.patternSubtypeItems.length, 0);
99-
test.equals(ni.patternSubtypeItemsIndex.length, 0);
100-
test.done();
101-
},
102-
'test oPatternSubType correctly capitalizes sectionNameUC' : function(test){
103-
var ni = new of.oPatternSubType('global-concepts');
104-
test.equals(ni.patternSubtypeLC, 'global-concepts');
105-
test.equals(ni.patternSubtypeUC, 'Global Concepts');
106-
test.done();
107-
}
108-
};
109-
110-
exports['oPatternSubTypeItem initialization'] = {
111-
'test oPatternSubTypeItem initializes correctly' : function(test){
112-
var sni = new of.oPatternSubTypeItem('test');
113-
test.equals(sni.patternName, 'Test');
114-
test.equals(sni.patternPath, '');
115-
test.equals(sni.patternPartialCode, '');
116-
test.done();
117-
},
118-
'test oPatternSubTypeItem capitalizes patternName' : function(test){
119-
var sni = new of.oPatternSubTypeItem('nav button');
120-
test.equals(sni.patternName, 'Nav Button');
121-
test.done();
122-
}
123-
};
124-
12574
}());

0 commit comments

Comments
 (0)