How to use the @babel/runtime/helpers/typeof function in @babel/runtime

To help you get started, we’ve selected a few @babel/runtime examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github salesforce / lwc / packages / @lwc / compiler / src / __tests__ / fixtures / expected-babel-compat.js View on Github external
__callKey1(console, "log", _toConsumableArray(foo)); // babel-plugin-transform-es2015-template-literals
// https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-es2015-template-literals/test/fixtures/loose/tag/actual.js
function literal() {
var foo = bar(_templateObject(), 42, __callKey0(_, "foobar"));
var bar = bar(_templateObject2(), 42, __callKey0(_, "foobar"));
var baz = bar(_templateObject3(), 42, __callKey0(_, "baz"));
return [foo, bar, baz];
} // babel-plugin-transform-es2015-typeof-symbol
// https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-es2015-typeof-symbol/test/fixtures/symbols/typeof/actual.js
var s = Symbol("s");
__callKey1(assert, "ok", _typeof(s) === "symbol");
__callKey2(assert, "equal", _typeof(s), "symbol");
__callKey2(assert, "equal", _typeof(_typeof(s._ES5ProxyType ? s.get("foo") : s.foo)), "symbol");
var ts = typeof s === "string";
__callKey1(assert, "isNotOk", (typeof o === "undefined" ? "undefined" : _typeof(o)) === "symbol");
__callKey2(assert, "notEqual", typeof o === "undefined" ? "undefined" : _typeof(o), "symbol");
__callKey2(assert, "notEqual", _typeof(_typeof(o._ES5ProxyType ? o.get("foo") : o.foo)), "symbol"); // babel-plugin-transform-es2015-unicode-regex
// https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-es2015-unicode-regex/test/fixtures/unicode-regex/basic/actual.js
var string = "foo💩bar";
var match = __callKey1(string, "match", /foo((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))bar/);
__callKey3(assert, "notEqual", string, match, ts); // babel-plugin-transform-async-to-generator
// https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-async-to-generator/test/fixtures/async-to-generator/async/actual.js
var Foo =
/*#__PURE__*/
function () {
function Foo() {
_classCallCheck(this, Foo);
}
_createClass(Foo, [{
key: "foo",
value: function () {
var _foo = _asyncToGenerator(
github salesforce / lwc / packages / @lwc / compiler / src / __tests__ / fixtures / expected-babel-compat.js View on Github external
// https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-es2015-template-literals/test/fixtures/loose/tag/actual.js
function literal() {
var foo = bar(_templateObject(), 42, __callKey0(_, "foobar"));
var bar = bar(_templateObject2(), 42, __callKey0(_, "foobar"));
var baz = bar(_templateObject3(), 42, __callKey0(_, "baz"));
return [foo, bar, baz];
} // babel-plugin-transform-es2015-typeof-symbol
// https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-es2015-typeof-symbol/test/fixtures/symbols/typeof/actual.js
var s = Symbol("s");
__callKey1(assert, "ok", _typeof(s) === "symbol");
__callKey2(assert, "equal", _typeof(s), "symbol");
__callKey2(assert, "equal", _typeof(_typeof(s._ES5ProxyType ? s.get("foo") : s.foo)), "symbol");
var ts = typeof s === "string";
__callKey1(assert, "isNotOk", (typeof o === "undefined" ? "undefined" : _typeof(o)) === "symbol");
__callKey2(assert, "notEqual", typeof o === "undefined" ? "undefined" : _typeof(o), "symbol");
__callKey2(assert, "notEqual", _typeof(_typeof(o._ES5ProxyType ? o.get("foo") : o.foo)), "symbol"); // babel-plugin-transform-es2015-unicode-regex
// https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-es2015-unicode-regex/test/fixtures/unicode-regex/basic/actual.js
var string = "foo💩bar";
var match = __callKey1(string, "match", /foo((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))bar/);
__callKey3(assert, "notEqual", string, match, ts); // babel-plugin-transform-async-to-generator
// https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-async-to-generator/test/fixtures/async-to-generator/async/actual.js
var Foo =
/*#__PURE__*/
function () {
function Foo() {
_classCallCheck(this, Foo);
}
_createClass(Foo, [{
key: "foo",
value: function () {
var _foo = _asyncToGenerator(
/*#__PURE__*/
github salesforce / lwc / packages / @lwc / compiler / src / __tests__ / fixtures / expected-babel-compat.js View on Github external
method: function method() {
return 5 + 5;
}
}; // babel-plugin-transform-es2015-spread
// https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-es2015-spread/test/fixtures/spread/single/actual.js
__callKey1(console, "log", _toConsumableArray(foo)); // babel-plugin-transform-es2015-template-literals
// https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-es2015-template-literals/test/fixtures/loose/tag/actual.js
function literal() {
var foo = bar(_templateObject(), 42, __callKey0(_, "foobar"));
var bar = bar(_templateObject2(), 42, __callKey0(_, "foobar"));
var baz = bar(_templateObject3(), 42, __callKey0(_, "baz"));
return [foo, bar, baz];
} // babel-plugin-transform-es2015-typeof-symbol
// https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-es2015-typeof-symbol/test/fixtures/symbols/typeof/actual.js
var s = Symbol("s");
__callKey1(assert, "ok", _typeof(s) === "symbol");
__callKey2(assert, "equal", _typeof(s), "symbol");
__callKey2(assert, "equal", _typeof(_typeof(s._ES5ProxyType ? s.get("foo") : s.foo)), "symbol");
var ts = typeof s === "string";
__callKey1(assert, "isNotOk", (typeof o === "undefined" ? "undefined" : _typeof(o)) === "symbol");
__callKey2(assert, "notEqual", typeof o === "undefined" ? "undefined" : _typeof(o), "symbol");
__callKey2(assert, "notEqual", _typeof(_typeof(o._ES5ProxyType ? o.get("foo") : o.foo)), "symbol"); // babel-plugin-transform-es2015-unicode-regex
// https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-es2015-unicode-regex/test/fixtures/unicode-regex/basic/actual.js
var string = "foo💩bar";
var match = __callKey1(string, "match", /foo((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))bar/);
__callKey3(assert, "notEqual", string, match, ts); // babel-plugin-transform-async-to-generator
// https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-async-to-generator/test/fixtures/async-to-generator/async/actual.js
var Foo =
/*#__PURE__*/
function () {
function Foo() {
_classCallCheck(this, Foo);
github cube-js / cube.js / packages / cubejs-client-core / dist / cubejs-client-core.esm.js View on Github external
var searchParams = new URLSearchParams(params && Object.keys(params).map(function (k) {
        return _defineProperty({}, k, _typeof(params[k]) === 'object' ? JSON.stringify(params[k]) : params[k]);
      }).reduce(function (a, b) {
        return _objectSpread({}, a, b);
github cube-js / cube.js / packages / cubejs-client-core / dist / cubejs-client-core.esm.js View on Github external
function CubejsApi(apiToken, options) {
    _classCallCheck(this, CubejsApi);

    if (_typeof(apiToken) === 'object') {
      options = apiToken;
      apiToken = undefined;
    }

    options = options || {};
    this.apiToken = apiToken;
    this.apiUrl = options.apiUrl || API_URL;
    this.headers = options.headers || {};
    this.transport = options.transport || new HttpTransport({
      authorization: typeof apiToken === 'function' ? undefined : apiToken,
      apiUrl: this.apiUrl,
      headers: this.headers
    });
    this.pollInterval = options.pollInterval || 5;
  }
github CalvinVon / vue-mount / es / mount.js View on Github external
fields.forEach(function (field) {
    if (_typeof(source[field]) === 'object') {
      target[field] = Object.assign({}, target[field], source[field]);
    }
  });
  return target;
github The-Politico / gootenberg / dist / module.js View on Github external
case 0:
            if (!(typeof config === 'string')) {
              _context.next = 6;
              break;
            }

            _context.next = 3;
            return readJSON(config);

          case 3:
            credentials = _context.sent;
            _context.next = 7;
            break;

          case 6:
            if (_typeof(config) === 'object') {
              credentials = config;
            } else if (config === undefined) {
              credentials = {
                client_email: process.env.GAPI_CLIENT_EMAIL,
                private_key: process.env.GAPI_PRIVATE_KEY.replace(/\\n/g, '\n')
              };
            }

          case 7:
            this.client = new JWT({
              email: credentials['client_email'],
              key: credentials['private_key'],
              scopes: ['https://www.googleapis.com/auth/drive']
            });
            _context.next = 10;
            return this.client.authorize();
github vuefront / vuefront / lib / store / common / apollo / apollo.js View on Github external
commit = _ref4.commit;
              _context3.prev = 1;
              variables = omitDeepLodash(options.variables, '__typename');
              o = {
                query: options.mutation.loc.source.body,
                variables: variables
              };
              map = {
                '0': 'file'
              };
              i = 0;
              fd = new FormData();
              fd.append('operations', JSON.stringify(o));

              for (key in variables) {
                if (_typeof(variables[key]) === 'object' && variables[key] instanceof File) {
                  map[i] = key;
                  fd.append(i, variables[key]);
                  i++;
                }
              }

              fd.append('map', JSON.stringify(map));
              axios = Axios.create({
                withCredentials: true
              });
              _context3.next = 13;
              return axios.post(this.$vuefront.baseURL, fd);

            case 13:
              _ref5 = _context3.sent;
              data = _ref5.data;
github kintone / kintone-js-sdk / esm / base / connection / Connection.js View on Github external
var queryArray = [];

        for (var key in obj) {
          if (obj.hasOwnProperty(key)) {
            var subPrefix = '';

            if (Array.isArray(obj)) {
              subPrefix = prefix ? prefix + '[' + key + ']' : key;
            } else {
              subPrefix = prefix ? prefix + '.' + key : key;
            }

            var value = obj[key];

            if (value !== undefined) {
              queryArray.push(value !== null && _typeof(value) === 'object' ? parseParams(value, subPrefix) : subPrefix + '=' + encodeURIComponent(value));
            }
          }
        }

        return queryArray.join('&');
      };