]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/d/index.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / node_modules / node-gyp / node_modules / path-array / node_modules / array-index / node_modules / es6-symbol / node_modules / d / index.js
diff --git a/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/d/index.js b/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/d/index.js
new file mode 100644 (file)
index 0000000..076ae46
--- /dev/null
@@ -0,0 +1,63 @@
+'use strict';
+
+var assign        = require('es5-ext/object/assign')
+  , normalizeOpts = require('es5-ext/object/normalize-options')
+  , isCallable    = require('es5-ext/object/is-callable')
+  , contains      = require('es5-ext/string/#/contains')
+
+  , d;
+
+d = module.exports = function (dscr, value/*, options*/) {
+       var c, e, w, options, desc;
+       if ((arguments.length < 2) || (typeof dscr !== 'string')) {
+               options = value;
+               value = dscr;
+               dscr = null;
+       } else {
+               options = arguments[2];
+       }
+       if (dscr == null) {
+               c = w = true;
+               e = false;
+       } else {
+               c = contains.call(dscr, 'c');
+               e = contains.call(dscr, 'e');
+               w = contains.call(dscr, 'w');
+       }
+
+       desc = { value: value, configurable: c, enumerable: e, writable: w };
+       return !options ? desc : assign(normalizeOpts(options), desc);
+};
+
+d.gs = function (dscr, get, set/*, options*/) {
+       var c, e, options, desc;
+       if (typeof dscr !== 'string') {
+               options = set;
+               set = get;
+               get = dscr;
+               dscr = null;
+       } else {
+               options = arguments[3];
+       }
+       if (get == null) {
+               get = undefined;
+       } else if (!isCallable(get)) {
+               options = get;
+               get = set = undefined;
+       } else if (set == null) {
+               set = undefined;
+       } else if (!isCallable(set)) {
+               options = set;
+               set = undefined;
+       }
+       if (dscr == null) {
+               c = true;
+               e = false;
+       } else {
+               c = contains.call(dscr, 'c');
+               e = contains.call(dscr, 'e');
+       }
+
+       desc = { get: get, set: set, configurable: c, enumerable: e };
+       return !options ? desc : assign(normalizeOpts(options), desc);
+};