file_path
stringlengths
3
280
file_language
stringclasses
66 values
content
stringlengths
1
1.04M
repo_name
stringlengths
5
92
repo_stars
int64
0
154k
repo_description
stringlengths
0
402
repo_primary_language
stringclasses
108 values
developer_username
stringlengths
1
25
developer_name
stringlengths
0
30
developer_company
stringlengths
0
82
crates/swc_ecma_transforms_base/src/helpers/_async_to_generator.js
JavaScript
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next,...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_await_async_generator.js
JavaScript
function _await_async_generator(value) { return new _await_value(value); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_await_value.js
JavaScript
function _await_value(value) { this.wrapped = value; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_call_super.js
JavaScript
function _call_super(_this, derived, args) { // Super derived = _get_prototype_of(derived); return _possible_constructor_return( _this, _is_native_reflect_construct() // NOTE: This doesn't work if this.__proto__.constructor has been modified. ? Reflect.construct(deriv...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_check_private_redeclaration.js
JavaScript
function _check_private_redeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_class_apply_descriptor_destructure.js
JavaScript
function _class_apply_descriptor_destructure(receiver, descriptor) { if (descriptor.set) { if (!("__destrObj" in descriptor)) { descriptor.__destrObj = { set value(v) { descriptor.set.call(receiver, v); } }; } return...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_class_apply_descriptor_get.js
JavaScript
function _class_apply_descriptor_get(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_class_apply_descriptor_set.js
JavaScript
function _class_apply_descriptor_set(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { // This should only throw in strict mode, but class bodies are // always strict and private fields can only...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_class_apply_descriptor_update.js
JavaScript
function _class_apply_descriptor_update(receiver, descriptor) { if (descriptor.set) { if (!descriptor.get) { throw new TypeError("attempted to read set only private field"); } if (!("__destrWrapper" in descriptor)) { descriptor.__destrWrapper = { set v...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_class_call_check.js
JavaScript
function _class_call_check(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_class_check_private_static_access.js
JavaScript
function _class_check_private_static_access(receiver, classConstructor) { if (receiver !== classConstructor) { throw new TypeError("Private static access of wrong provenance"); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_class_check_private_static_field_descriptor.js
JavaScript
function _class_check_private_static_field_descriptor(descriptor, action) { if (descriptor === undefined) { throw new TypeError("attempted to " + action + " private static field before its declaration"); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_class_extract_field_descriptor.js
JavaScript
function _class_extract_field_descriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_class_name_tdz_error.js
JavaScript
function _class_name_tdz_error(name) { throw new Error("Class \"" + name + "\" cannot be referenced in computed property keys."); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_class_private_field_destructure.js
JavaScript
function _class_private_field_destructure(receiver, privateMap) { var descriptor = _class_extract_field_descriptor(receiver, privateMap, "set"); return _class_apply_descriptor_destructure(receiver, descriptor); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_class_private_field_get.js
JavaScript
function _class_private_field_get(receiver, privateMap) { var descriptor = _class_extract_field_descriptor(receiver, privateMap, "get"); return _class_apply_descriptor_get(receiver, descriptor); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_class_private_field_init.js
JavaScript
function _class_private_field_init(obj, privateMap, value) { _check_private_redeclaration(obj, privateMap); privateMap.set(obj, value); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_class_private_field_loose_base.js
JavaScript
function _class_private_field_loose_base(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError("attempted to use private field on non-instance"); } return receiver; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_class_private_field_loose_key.js
JavaScript
var id = 0; function _class_private_field_loose_key(name) { return "__private_" + id++ + "_" + name; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_class_private_field_set.js
JavaScript
function _class_private_field_set(receiver, privateMap, value) { var descriptor = _class_extract_field_descriptor(receiver, privateMap, "set"); _class_apply_descriptor_set(receiver, descriptor, value); return value; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_class_private_field_update.js
JavaScript
function _class_private_field_update(receiver, privateMap) { var descriptor = _class_extract_field_descriptor(receiver, privateMap, "update"); return _class_apply_descriptor_update(receiver, descriptor); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_class_private_method_get.js
JavaScript
function _class_private_method_get(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_class_private_method_init.js
JavaScript
function _class_private_method_init(obj, privateSet) { _check_private_redeclaration(obj, privateSet); privateSet.add(obj); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_class_private_method_set.js
JavaScript
function _class_private_method_set() { throw new TypeError("attempted to reassign private method"); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_class_static_private_field_destructure.js
JavaScript
function _class_static_private_field_destructure(receiver, classConstructor, descriptor) { _class_check_private_static_access(receiver, classConstructor); _class_check_private_static_field_descriptor(descriptor, "set"); return _class_apply_descriptor_destructure(receiver, descriptor); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_class_static_private_field_spec_get.js
JavaScript
function _class_static_private_field_spec_get(receiver, classConstructor, descriptor) { _class_check_private_static_access(receiver, classConstructor); _class_check_private_static_field_descriptor(descriptor, "get"); return _class_apply_descriptor_get(receiver, descriptor); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_class_static_private_field_spec_set.js
JavaScript
function _class_static_private_field_spec_set(receiver, classConstructor, descriptor, value) { _class_check_private_static_access(receiver, classConstructor); _class_check_private_static_field_descriptor(descriptor, "set"); _class_apply_descriptor_set(receiver, descriptor, value); return value; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_class_static_private_field_update.js
JavaScript
function _class_static_private_field_update(receiver, classConstructor, descriptor) { _class_check_private_static_access(receiver, classConstructor); _class_check_private_static_field_descriptor(descriptor, "update"); return _class_apply_descriptor_update(receiver, descriptor); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_class_static_private_method_get.js
JavaScript
function _class_static_private_method_get(receiver, classConstructor, method) { _class_check_private_static_access(receiver, classConstructor); return method; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_construct.js
JavaScript
function _construct(Parent, args, Class) { if (_is_native_reflect_construct()) { _construct = Reflect.construct; } else { _construct = function construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_create_class.js
JavaScript
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_create_for_of_iterator_helper_loose.js
JavaScript
function _create_for_of_iterator_helper_loose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); // Fallback for engines without symbol support if (Array.isArray(o) || (it = _unsupported_iterable_to_array(...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_create_super.js
JavaScript
function _create_super(Derived) { var hasNativeReflectConstruct = _is_native_reflect_construct(); return function _createSuperInternal() { var Super = _get_prototype_of(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _get_prototype_of(this).constructor; ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_decorate.js
JavaScript
function _decorate(decorators, factory, superClass) { var r = factory(function initialize(O) { _initializeInstanceElements(O, decorated.elements); }, superClass); var decorated = _decorateClass(_coalesceClassElements(r.d.map(_createElementDescriptor)), decorators); _initializeClassElements(r.F, ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_defaults.js
JavaScript
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defi...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_define_enumerable_properties.js
JavaScript
function _define_enumerable_properties(obj, descs) { for (var key in descs) { var desc = descs[key]; desc.configurable = desc.enumerable = true; if ("value" in desc) desc.writable = true; Object.defineProperty(obj, key, desc); } if (Object.getOwnPropertySymbols) { var...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_define_property.js
JavaScript
function _define_property(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_dispose.js
JavaScript
/* @minVersion 7.22.0 */ function dispose_SuppressedError(suppressed, error) { if (typeof SuppressedError !== "undefined") { // eslint-disable-next-line no-undef dispose_SuppressedError = SuppressedError; } else { dispose_SuppressedError = function SuppressedError(suppressed, error) { ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_export_star.js
JavaScript
function _export_star(from, to) { Object.keys(from).forEach(function(k) { if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) { Object.defineProperty(to, k, { enumerable: true, get: function() { return from[k]; ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_extends.js
JavaScript
function _extends() { _extends = Object.assign || function(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_get.js
JavaScript
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function get(target, property, receiver) { var base = _super_prop_base(target, property); if (!base) return; var desc = Object....
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_get_prototype_of.js
JavaScript
function _get_prototype_of(o) { _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _get_prototype_of(o); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_identity.js
JavaScript
function _identity(x) { return x; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_inherits.js
JavaScript
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_inherits_loose.js
JavaScript
function _inherits_loose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_initializer_define_property.js
JavaScript
function _initializer_define_property(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_initializer_warning_helper.js
JavaScript
function _initializer_warning_helper(descriptor, context) { throw new Error( "Decorating class property failed. Please ensure that " + "proposal-class-properties is enabled and set to use loose mode. " + "To use proposal-class-properties in spec mode with decorators, wait for " + "th...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_instanceof.js
JavaScript
function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return !!right[Symbol.hasInstance](left); } else { return left instanceof right; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_interop_require_default.js
JavaScript
function _interop_require_default(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_interop_require_wildcard.js
JavaScript
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_is_native_function.js
JavaScript
function _is_native_function(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_is_native_reflect_construct.js
JavaScript
function _is_native_reflect_construct() { // Since Reflect.construct can't be properly polyfilled, some // implementations (e.g. core-js@2) don't set the correct internal slots. // Those polyfills don't allow us to subclass built-ins, so we need to // use our fallback implementation. try { /...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_iterable_to_array.js
JavaScript
function _iterable_to_array(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_iterable_to_array_limit.js
JavaScript
function _iterable_to_array_limit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_iterable_to_array_limit_loose.js
JavaScript
function _iterable_to_array_limit_loose(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; for (_i = _i.call(arr), _step; !(_step = _i.next()).done;) { _arr.push(_step.value); if (i && _arr.length...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_jsx.js
JavaScript
var REACT_ELEMENT_TYPE; function _jsx(type, props, key, children) { if (!REACT_ELEMENT_TYPE) { REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; } var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_new_arrow_check.js
JavaScript
function _new_arrow_check(innerThis, boundThis) { if (innerThis !== boundThis) { throw new TypeError("Cannot instantiate an arrow function"); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_non_iterable_rest.js
JavaScript
function _non_iterable_rest() { throw new TypeError( "Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_non_iterable_spread.js
JavaScript
function _non_iterable_spread() { throw new TypeError( "Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_object_destructuring_empty.js
JavaScript
function _object_destructuring_empty(o) { if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o); return o; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_object_spread.js
JavaScript
function _object_spread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === "function") { ownKeys = ownKeys.concat( Object.getO...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_object_spread_props.js
JavaScript
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function(sym) { return Object.getOwnPropertyDescriptor(obj...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_object_without_properties.js
JavaScript
function _object_without_properties(source, excluded) { if (source == null) return {}; var target = _object_without_properties_loose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbo...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_object_without_properties_loose.js
JavaScript
function _object_without_properties_loose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key]...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_possible_constructor_return.js
JavaScript
function _possible_constructor_return(self, call) { if (call && (_type_of(call) === "object" || typeof call === "function")) { return call; } return _assert_this_initialized(self); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_read_only_error.js
JavaScript
function _read_only_error(name) { throw new TypeError("\"" + name + "\" is read-only"); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_set.js
JavaScript
function set(target, property, value, receiver) { if (typeof Reflect !== "undefined" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _super_prop_base(target, property); var desc; if (base) { ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_set_prototype_of.js
JavaScript
function _set_prototype_of(o, p) { _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _set_prototype_of(o, p); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_skip_first_generator_next.js
JavaScript
function _skip_first_generator_next(fn) { return function() { var it = fn.apply(this, arguments); it.next(); return it; }; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_sliced_to_array.js
JavaScript
function _sliced_to_array(arr, i) { return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest(); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_sliced_to_array_loose.js
JavaScript
function _sliced_to_array_loose(arr, i) { return _array_with_holes(arr) || _iterable_to_array_limit_loose(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest(); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_super_prop_base.js
JavaScript
function _super_prop_base(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _get_prototype_of(object); if (object === null) break; } return object; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_tagged_template_literal.js
JavaScript
function _tagged_template_literal(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_tagged_template_literal_loose.js
JavaScript
function _tagged_template_literal_loose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_throw.js
JavaScript
function _throw(e) { throw e; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_to_array.js
JavaScript
function _to_array(arr) { return _array_with_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_rest(); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_to_consumable_array.js
JavaScript
function _to_consumable_array(arr) { return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread(); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_to_primitive.js
JavaScript
function _to_primitive(input, hint) { if (_type_of(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_type_of(res) !== "object") return res; throw new TypeError("@@to...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_to_property_key.js
JavaScript
function _to_property_key(arg) { var key = _to_primitive(arg, "string"); return _type_of(key) === "symbol" ? key : String(key); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_ts_add_disposable_resource.js
JavaScript
function _ts_add_disposable_resource(env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); var dispose, inner; if (async) { if (!Symbol.asyncDispose) throw new TypeErro...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_ts_decorate.js
JavaScript
function _ts_decorate(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_ts_dispose_resources.js
JavaScript
function _ts_dispose_resources(env) { var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { var e = new Error(message); return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; }; return (_ts_dispos...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_ts_generator.js
JavaScript
function _ts_generator(thisArg, body) { var f, y, t, g, _ = { label: 0, sent: function () { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }; return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g; ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_ts_metadata.js
JavaScript
function _ts_metadata(k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_ts_param.js
JavaScript
function _ts_param(paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_ts_values.js
JavaScript
function _ts_values(o) { var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); if (o && typeof o.length === "number") return { next: function () { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_type_of.js
JavaScript
function _type_of(obj) { "@swc/helpers - typeof"; return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_unsupported_iterable_to_array.js
JavaScript
function _unsupported_iterable_to_array(o, minLen) { if (!o) return; if (typeof o === "string") return _array_like_to_array(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.fr...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_update.js
JavaScript
function _update(target, property, receiver, isStrict) { return { get _() { return _get(target, property, receiver); }, set _(value) { _set(target, property, value, receiver, isStrict); } }; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_using.js
JavaScript
function _using(stack, value, isAwait) { if (value === null || value === void 0) return value; if (Object(value) !== value) { throw new TypeError("using declarations can only be used with objects, functions, null, or undefined."); } // core-js-pure uses Symbol.for for polyfilling well-known symb...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_using_ctx.js
JavaScript
function _using_ctx() { var _disposeSuppressedError = typeof SuppressedError === "function" ? // eslint-disable-next-line no-undef SuppressedError : (function (error, suppressed) { var err = new Error(); err.name = "SuppressedError"; ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_wrap_async_generator.js
JavaScript
function _wrap_async_generator(fn) { return function() { return new _async_generator(fn.apply(this, arguments)); }; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_wrap_native_super.js
JavaScript
function _wrap_native_super(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrap_native_super = function wrapNativeSuper(Class) { if (Class === null || !_is_native_function(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super e...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/_write_only_error.js
JavaScript
function _write_only_error(name) { throw new TypeError("\"" + name + "\" is write-only"); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/helpers/mod.rs
Rust
use std::{cell::RefCell, mem::replace}; use once_cell::sync::Lazy; use rustc_hash::FxHashMap; use swc_atoms::Atom; use swc_common::{FileName, FilePathMapping, Mark, SourceMap, SyntaxContext, DUMMY_SP}; use swc_ecma_ast::*; use swc_ecma_utils::{prepend_stmts, quote_ident, DropSpan, ExprFactory}; use swc_ecma_visit::{no...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/hygiene/mod.rs
Rust
use rustc_hash::FxHashSet; use swc_atoms::Atom; use swc_common::Mark; use swc_ecma_ast::*; use swc_ecma_utils::stack_size::maybe_grow_default; use swc_ecma_visit::{noop_visit_mut_type, visit_mut_pass, VisitMut, VisitMutWith}; pub use crate::rename::rename; use crate::rename::{renamer, Renamer}; #[cfg(test)] mod tests...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/hygiene/tests.rs
Rust
use rustc_hash::FxHashMap; use swc_atoms::Atom; use swc_common::{hygiene::*, DUMMY_SP}; use swc_ecma_parser::Syntax; use swc_ecma_utils::quote_ident; use swc_ecma_visit::{Fold, FoldWith}; use testing::{assert_eq, DebugUsingDisplay}; use super::*; use crate::tests::{HygieneVisualizer, Tester}; struct Marker { map:...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/lib.rs
Rust
// #![cfg_attr(test, deny(warnings))] #![allow(clippy::mutable_key_type)] #![cfg_attr(not(test), allow(unused))] pub use self::resolver::resolver; #[doc(hidden)] pub mod ext; pub mod fixer; #[macro_use] pub mod hygiene; pub mod assumptions; pub mod feature; pub mod helpers; #[doc(hidden)] pub mod native; pub mod perf...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/native.rs
Rust
//! Module to check if an identifier is native word. use phf::phf_set; macro_rules! native { ( $( $i:tt ),* ) => { /// Is `sym` a native **class**? pub fn is_native(sym: &str) -> bool { static SET: phf::Set<&'static str> = phf_set! { $( ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_base/src/perf.rs
Rust
use swc_common::util::move_map::MoveMap; #[cfg(feature = "concurrent")] use swc_common::{errors::HANDLER, GLOBALS}; use swc_ecma_ast::*; pub use swc_ecma_utils::parallel::*; use swc_ecma_visit::{Fold, FoldWith, Visit, VisitMut, VisitMutWith, VisitWith}; use crate::helpers::Helpers; #[cfg(feature = "concurrent")] use c...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University