Make polymer-expressions/path-parser a simple CommonJS module.

The weird module.exports code broke the webpack parser.
This commit is contained in:
Hristo Deshev
2015-12-02 18:47:05 +02:00
parent 643f9bf901
commit fa264d9374

View File

@ -7,7 +7,6 @@
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
(function (global) {
'use strict';
function detectEval() {
@ -46,8 +45,8 @@
return obj === Object(obj);
}
var numberIsNaN = global.Number.isNaN || function (value) {
return typeof value === 'number' && global.isNaN(value);
var numberIsNaN = Number.isNaN || function (value) {
return typeof value === 'number' && isNaN(value);
}
function areSameValue(left, right) {
@ -391,19 +390,4 @@
invalidPath.valid = false;
invalidPath.getValueFrom = invalidPath.setValueFrom = function () { };
// Export the observe-js object for **Node.js**, with
// backwards-compatibility for the old `require()` API. If we're in
// the browser, export as a global object.
var expose = global;
if (typeof exports !== 'undefined') {
if (typeof module !== 'undefined' && module.exports) {
expose = exports = module.exports;
}
expose = exports;
}
expose.Path = Path;
})(typeof global !== 'undefined' && global && typeof module !== 'undefined' && module ? global : this || window);
exports.Path = Path;