Skip to content

Commit

Permalink
Merge pull request #185 from kewisch/node-double-import
Browse files Browse the repository at this point in the history
Make sure double imports work in node
  • Loading branch information
kewisch committed Jul 6, 2015
2 parents 46e9fd3 + f078dae commit fd1a2ad
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 60 deletions.
39 changes: 9 additions & 30 deletions build/ical.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
* Portions Copyright (C) Philipp Kewisch, 2011-2015 */


/* istanbul ignore next */
/* jshint ignore:start */
if (typeof ICAL === 'undefined') {
if (typeof exports === 'object') {
// CommonJS
ICAL = exports;
} else if (typeof window !== 'undefined') {
// Browser globals
if (typeof module === 'object') {
// CommonJS, where exports may be different each time.
ICAL = module.exports;
} else /* istanbul ignore next */ if (typeof window !== 'undefined') {
if (typeof ICAL !== 'object') {
/** @ignore */
this.ICAL = {};
} else {
// ...?
ICAL = {};
}
} else /* istanbul ignore next */ {
// ...?
ICAL = {};
}
/* jshint ignore:end */

Expand Down Expand Up @@ -329,9 +329,6 @@ ICAL.helpers = {

/** @namespace ICAL */

/* istanbul ignore next */
(typeof(ICAL) === 'undefined') ? ICAL = {} : ''; // jshint ignore:line


/**
* This symbol is further described later on
Expand Down Expand Up @@ -3284,9 +3281,6 @@ ICAL.Binary = (function() {



/* istanbul ignore next */
(typeof(ICAL) === 'undefined') ? ICAL = {} : ''; // jshint ignore:line

(function() {
/**
* @classdesc
Expand Down Expand Up @@ -3511,9 +3505,6 @@ ICAL.Binary = (function() {



/* istanbul ignore next */
(typeof(ICAL) === 'undefined') ? ICAL = {} : ''; // jshint ignore:line

(function() {
var DURATION_LETTERS = /([PDWHMTS]{1,1})/;

Expand Down Expand Up @@ -3872,9 +3863,6 @@ ICAL.Binary = (function() {



/* istanbul ignore next */
(typeof(ICAL) === 'undefined') ? ICAL = {} : ''; // jshint ignore:line

(function() {
var OPTIONS = ["tzid", "location", "tznames",
"latitude", "longitude"];
Expand Down Expand Up @@ -4496,9 +4484,6 @@ ICAL.TimezoneService = (function() {



/* istanbul ignore next */
(typeof(ICAL) === 'undefined') ? ICAL = {} : ''; // jshint ignore:line

(function() {

/**
Expand Down Expand Up @@ -5794,9 +5779,6 @@ ICAL.TimezoneService = (function() {



/* istanbul ignore next */
(typeof(ICAL) === 'undefined') ? ICAL = {} : ''; // jshint ignore:line

(function() {

/**
Expand Down Expand Up @@ -5993,9 +5975,6 @@ ICAL.TimezoneService = (function() {



/* istanbul ignore next */
(typeof(ICAL) === 'undefined') ? ICAL = {} : ''; // jshint ignore:line

(function() {
var DOW_MAP = {
SU: ICAL.Time.SUNDAY,
Expand Down
3 changes: 0 additions & 3 deletions lib/ical/design.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

/** @namespace ICAL */

/* istanbul ignore next */
(typeof(ICAL) === 'undefined') ? ICAL = {} : ''; // jshint ignore:line


/**
* This symbol is further described later on
Expand Down
3 changes: 0 additions & 3 deletions lib/ical/duration.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

"use strict";

/* istanbul ignore next */
(typeof(ICAL) === 'undefined') ? ICAL = {} : ''; // jshint ignore:line

(function() {
var DURATION_LETTERS = /([PDWHMTS]{1,1})/;

Expand Down
18 changes: 9 additions & 9 deletions lib/ical/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
* Portions Copyright (C) Philipp Kewisch, 2011-2015 */


/* istanbul ignore next */
/* jshint ignore:start */
if (typeof ICAL === 'undefined') {
if (typeof exports === 'object') {
// CommonJS
ICAL = exports;
} else if (typeof window !== 'undefined') {
// Browser globals
if (typeof module === 'object') {
// CommonJS, where exports may be different each time.
ICAL = module.exports;
} else /* istanbul ignore next */ if (typeof window !== 'undefined') {
if (typeof ICAL !== 'object') {
/** @ignore */
this.ICAL = {};
} else {
// ...?
ICAL = {};
}
} else /* istanbul ignore next */ {
// ...?
ICAL = {};
}
/* jshint ignore:end */

Expand Down
3 changes: 0 additions & 3 deletions lib/ical/period.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

"use strict";

/* istanbul ignore next */
(typeof(ICAL) === 'undefined') ? ICAL = {} : ''; // jshint ignore:line

(function() {
/**
* @classdesc
Expand Down
3 changes: 0 additions & 3 deletions lib/ical/recur.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

"use strict";

/* istanbul ignore next */
(typeof(ICAL) === 'undefined') ? ICAL = {} : ''; // jshint ignore:line

(function() {
var DOW_MAP = {
SU: ICAL.Time.SUNDAY,
Expand Down
3 changes: 0 additions & 3 deletions lib/ical/time.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

"use strict";

/* istanbul ignore next */
(typeof(ICAL) === 'undefined') ? ICAL = {} : ''; // jshint ignore:line

(function() {

/**
Expand Down
3 changes: 0 additions & 3 deletions lib/ical/timezone.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

"use strict";

/* istanbul ignore next */
(typeof(ICAL) === 'undefined') ? ICAL = {} : ''; // jshint ignore:line

(function() {
var OPTIONS = ["tzid", "location", "tznames",
"latitude", "longitude"];
Expand Down
3 changes: 0 additions & 3 deletions lib/ical/vcard_time.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

"use strict";

/* istanbul ignore next */
(typeof(ICAL) === 'undefined') ? ICAL = {} : ''; // jshint ignore:line

(function() {

/**
Expand Down

0 comments on commit fd1a2ad

Please sign in to comment.