mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00
Make polymer-expressions/path-parser a simple CommonJS module.
The weird module.exports code broke the webpack parser.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user