Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
createList(...args) {
logger.deprecate('0.29.0', 'The `State` model has been renamed to `Value`.')
return Value.createList(...args)
},
function generateKey() {
logger.deprecate(
`0.35.0`,
'The `generateKey()` util is deprecrated. Use the `KeyUtils.create()` helper instead.'
)
return KeyUtils.create()
}
get kind() {
logger.deprecate(
'slate@0.32.0',
'The `kind` property of Slate objects has been renamed to `object`.'
)
return this.object
}
function setKeyGenerator(fn) {
logger.deprecate(
`0.35.0`,
'The `setKeyGenerator()` util is deprecrated. Use the `KeyUtils.setGenerator()` helper instead.'
)
return KeyUtils.setGenerator(fn)
}
createList(...args) {
logger.deprecate('0.27.0', 'The `Selection` model has been renamed to `Range`.')
return Range.createList(...args)
},
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)
}
function resetKeyGenerator() {
logger.deprecate(
`0.35.0`,
'The `resetKeyGenerator()` util is deprecrated. Use the `KeyUtils.resetGenerator()` helper instead.'
)
return KeyUtils.resetGenerator()
}
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}
*/