mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 03:31:45 +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
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function (global) {
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function detectEval() {
|
function detectEval() {
|
||||||
@ -46,8 +45,8 @@
|
|||||||
return obj === Object(obj);
|
return obj === Object(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
var numberIsNaN = global.Number.isNaN || function (value) {
|
var numberIsNaN = Number.isNaN || function (value) {
|
||||||
return typeof value === 'number' && global.isNaN(value);
|
return typeof value === 'number' && isNaN(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
function areSameValue(left, right) {
|
function areSameValue(left, right) {
|
||||||
@ -391,19 +390,4 @@
|
|||||||
invalidPath.valid = false;
|
invalidPath.valid = false;
|
||||||
invalidPath.getValueFrom = invalidPath.setValueFrom = function () { };
|
invalidPath.getValueFrom = invalidPath.setValueFrom = function () { };
|
||||||
|
|
||||||
// Export the observe-js object for **Node.js**, with
|
exports.Path = Path;
|
||||||
// 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);
|
|
||||||
|
Reference in New Issue
Block a user