Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format jsfiles #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,710 changes: 903 additions & 807 deletions lib/attributes.js

Large diffs are not rendered by default.

301 changes: 150 additions & 151 deletions lib/enums.js

Large diffs are not rendered by default.

16 changes: 7 additions & 9 deletions lib/ipputil.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@


'use strict';
// To serialize and deserialize, we need to be able to look
// things up by key or by value. This little helper just
// converts the arrays to objects and tacks on a 'lookup' property.
function xref(arr){
function xref(arr) {
var obj = {};
arr.forEach(function(item, index){
arr.forEach(function(item, index) {
obj[item] = index;
});
obj.lookup = arr;
Expand All @@ -14,15 +13,14 @@ function xref(arr){

exports.xref = xref;

exports.extend = function extend(destination, source) {
for(var property in source) {
exports.extend = function extend(destination, source) {
for (var property in source) {
if (source[property] && source[property].constructor === Object) {
destination[property] = destination[property] || {};
extend(destination[property], source[property]);
}
else {
} else {
destination[property] = source[property];
}
}
return destination;
};
};
Loading