How to use slate-dev-logger - 8 common examples

To help you get started, we’ve selected a few slate-dev-logger 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 ianstormtaylor / slate / packages / slate / src / models / state.js View on Github external
createList(...args) {
    logger.deprecate('0.29.0', 'The `State` model has been renamed to `Value`.')
    return Value.createList(...args)
  },
github ianstormtaylor / slate / packages / slate / src / utils / generate-key.js View on Github external
function generateKey() {
  logger.deprecate(
    `0.35.0`,
    'The `generateKey()` util is deprecrated. Use the `KeyUtils.create()` helper instead.'
  )

  return KeyUtils.create()
}
github ianstormtaylor / slate / packages / slate / src / models / character.js View on Github external
get kind() {
    logger.deprecate(
      'slate@0.32.0',
      'The `kind` property of Slate objects has been renamed to `object`.'
    )
    return this.object
  }
github ianstormtaylor / slate / packages / slate / src / utils / generate-key.js View on Github external
function setKeyGenerator(fn) {
  logger.deprecate(
    `0.35.0`,
    'The `setKeyGenerator()` util is deprecrated. Use the `KeyUtils.setGenerator()` helper instead.'
  )

  return KeyUtils.setGenerator(fn)
}
github ianstormtaylor / slate / packages / slate / src / models / selection.js View on Github external
createList(...args) {
    logger.deprecate('0.27.0', 'The `Selection` model has been renamed to `Range`.')
    return Range.createList(...args)
  },
github ianstormtaylor / slate / packages / slate / src / models / stack.js View on Github external
return plugins.reduceRight((children, plugin) => {
      if (!plugin[property]) return children

      if (property === 'renderPortal') {
        logger.deprecate(
          '0.39.0',
          'The `renderPortal` property of plugins is deprecated, please use `renderEditor` with a `` in React 16 instead.'
        )
      }

      const ret = plugin[property](props, ...args)
      if (ret == null) return children
      props.children = ret
      return ret
    }, props.children === undefined ? null : props.children)
  }
github ianstormtaylor / slate / packages / slate / src / utils / generate-key.js View on Github external
function resetKeyGenerator() {
  logger.deprecate(
    `0.35.0`,
    'The `resetKeyGenerator()` util is deprecrated. Use the `KeyUtils.resetGenerator()` helper instead.'
  )

  return KeyUtils.resetGenerator()
}
github ianstormtaylor / slate-plugins / packages / slate-drop-or-paste-images / src / index.js View on Github external
function DropOrPasteImages(options = {}) {
  let { insertImage, extensions } = options

  if (options.applyTransform) {
    logger.deprecate(
      '0.6.0',
      'The `applyTransform` argument to `slate-drop-or-paste-images` has been renamed to `insertImage` instead.'
    )
    insertImage = options.applyTransform
  }

  if (!insertImage) {
    throw new Error('You must supply an `insertImage` function.')
  }

  /**
   * Check file extension against user-defined options.
   *
   * @param {Type} string
   * @return {Boolean}
   */

slate-dev-logger

INTERNAL: A simple, development-only logger for Slate.

MIT
Latest version published 6 years ago

Package Health Score

68 / 100
Full package analysis

Popular slate-dev-logger functions

Similar packages