UNPKG

ckeditor5-image-upload-base64

Version:

The development environment of CKEditor 5 – the best browser-based rich text editor.

25 lines (20 loc) 482 B
/** * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ /** * @module utils/first */ /** * Returns first item of the given `iterable`. * * @param {Iterable.<*>} iterable * @returns {*} */ export default function first( iterable ) { const iteratorItem = iterable.next(); if ( iteratorItem.done ) { return null; } return iteratorItem.value; }