congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo For Javascript
default
Code IndexAdd Tabnine to your IDE (free)

How to use
default
function

Best JavaScript code snippets using default(Showing top 15 results out of 3,348)

origin: Automattic/wp-calypso

export async function getStepComponent( stepName ) {
  const moduleName = stepNameToModuleName[ stepName ];
  const module = await import(
    /* webpackChunkName: "async-load-signup-steps-[request]", webpackInclude: /signup\/steps\/[0-9a-z-]+\/index.jsx$/ */ `calypso/signup/steps/${ moduleName }`
  );
  return module.default;
}
origin: cteamx/Thief

// Install `vue-devtools`
require('electron').app.on('ready', () => {
 let installExtension = require('electron-devtools-installer')
 installExtension.default(installExtension.VUEJS_DEVTOOLS)
  .then(() => {})
  .catch(err => {
   console.log('Unable to install `vue-devtools`: \n', err)
  })
})
origin: eggjs/egg

createInstance(config, clientName) {
  // async creator only support createInstanceAsync
  assert(!is.asyncFunction(this.create),
   `egg:singleton ${this.name} only support create asynchronous, please use createInstanceAsync`);
  // options.default will be merge in to options.clients[id]
  config = Object.assign({}, this.options.default, config);
  return this.create(config, this.app, clientName);
 }
origin: eggjs/egg

async createInstanceAsync(config, clientName) {
  // options.default will be merge in to options.clients[id]
  config = Object.assign({}, this.options.default, config);
  return await this.create(config, this.app, clientName);
 }
origin: ks888/LambStatus

// Setup hot module replacement
  module.hot.accept('./components/adminPage/Routes', () => {
   setTimeout(() => {
    ReactDOM.unmountComponentAtNode(MOUNT_NODE)
    const newRoutes = require('./components/adminPage/Routes').default
    render(newRoutes)
   })
  })
origin: muicss/mui

_angular.default.module(moduleName, []).directive('muiDropdownItem', function () {
 return {
  restrict: 'AE',
  replace: true,
  scope: {
   link: '@'
  },
  transclude: true,
  template: '<li><a href="{{link}}" ng-transclude></a></li>'
 };
});
origin: muicss/mui

it('renders wrapper properly', function () {
  var result = (0, _reactHelpers.getShallowRendererOutput)(elem);

  _assert.default.equal(result.type, 'div');

  _assert.default.equal(result.props.className, 'mui-dropdown ');
 });
origin: ks888/LambStatus

constructor (props) {
  super(props)
  const curr = getDateTime(this.props.default)
  const hour = curr.hour() < 10 ? `0${curr.hour()}` : `${curr.hour()}`
  const minute = curr.minute() < 10 ? `0${curr.minute()}` : `${curr.minute()}`
  this.state = {
   date: curr,
   time: `${hour}:${minute}`
  }
 }
origin: muicss/mui

(0, _textfieldHelpers.textfieldWrapper)(function (props) {
 var inputRef = props.inputRef,
   rest = babelHelpers.objectWithoutProperties(props, ["inputRef"]);
 return /*#__PURE__*/_react.default.createElement("input", babelHelpers.extends({
  ref: inputRef
 }, rest));
})
origin: gridsome/gridsome

export function formatError (err, route) {
 const matched = route.matched[0]
 const options = matched ? matched.components.default : {}

 if (err.stringified && options.__file) {
  console.error(
   `An error occurred while executing ` +
   `query for ${options.__file}\n\n` +
   `Error: ${err.stringified}`
  )
 }
}
origin: muicss/mui

/*#__PURE__*/_react.default.createElement("ul", {
     ref: function ref(el) {
      _this2.menuElRef = el;
     },
     className: cs,
     style: this.state.menuPos,
     onClick: this.selectCB
    }, children)
origin: muicss/mui

it('renders properly with addtional classNames', function () {
  var result = (0, _reactHelpers.getShallowRendererOutput)( /*#__PURE__*/_react.default.createElement(_button.default, {
   className: "additional"
  }, "test"));

  _assert.default.equal(/\badditional\b/.test(result.props.className), true);
 });
origin: muicss/mui

it('renders properly with additional styles', function () {
  var result = (0, _reactHelpers.getShallowRendererOutput)( /*#__PURE__*/_react.default.createElement(_button.default, {
   style: {
    additonal: 'style'
   }
  }, "test"));

  _assert.default.equal(result.props.style.additonal, 'style');
 });
origin: muicss/mui

it('renders properly with additional classNames', function () {
  var result = (0, _reactHelpers.getShallowRendererOutput)( /*#__PURE__*/_react.default.createElement(_dropdown.default, {
   className: "additional"
  }, "test"));

  _assert.default.equal(result.props.className, 'mui-dropdown additional');
 });
origin: muicss/mui

(0, _textfieldHelpers.textfieldWrapper)(function (props) {
 var inputRef = props.inputRef,
   rest = babelHelpers.objectWithoutProperties(props, ["inputRef"]); // default number of rows

 if (!'rows' in rest) rest.rows = 2;
 return /*#__PURE__*/_react.default.createElement("textarea", babelHelpers.extends({
  ref: inputRef
 }, rest));
})
default

Popular in JavaScript

  • async
    Higher-order functions and common patterns for asynchronous code
  • crypto
  • ms
    Tiny millisecond conversion utility
  • express
    Fast, unopinionated, minimalist web framework
  • fs-extra
    fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as mkdir -p, cp -r, and rm -rf.
  • rimraf
    A deep deletion module for node (like `rm -rf`)
  • through2
    A tiny wrapper around Node.js streams.Transform (Streams2/3) to avoid explicit subclassing noise
  • winston
    A logger for just about everything.
  • qs
    A querystring parser that supports nesting and arrays, with a depth limit
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJavascript Code Index
Get Tabnine for your IDE now