Selaa lähdekoodia

Move feature detection to more organized structure.

Mateusz Samsel 6 vuotta sitten
vanhempi
sitoutus
fdc9a4f259

+ 3 - 2
packages/ckeditor5-utils/src/featuredetection.js → packages/ckeditor5-utils/src/featuredetection/regexp.js

@@ -4,11 +4,11 @@
  */
 
 /**
- * @module utils/featuredetection
+ * @module utils/featuredetection/regexp
  */
 
 /**
- * Holds feature detection used by the editor.
+ * Holds feature detection related to regular expressions used by the editor.
  *
  * @protected
  * @namespace
@@ -16,6 +16,7 @@
 export default {
 	/**
 	 * Indicates whether the current browser supports ES2018 Unicode properties like `\p{P}` or `\p{L}`.
+	 * More information about unicode properties might be found [here](https://www.unicode.org/reports/tr44/#GC_Values_Table).
 	 *
 	 * @type {Boolean}
 	 */

+ 2 - 2
packages/ckeditor5-utils/tests/featuredetection.js → packages/ckeditor5-utils/tests/featuredetection/regexp.js

@@ -3,14 +3,14 @@
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
 
-import featureDetection from '../src/featuredetection';
+import regExpFeatureDetection from '../../src/featuredetection/regexp';
 
 describe( 'featuredetection', () => {
 	describe( 'isUnicodePropertySupported', () => {
 		it( 'should detect accessibility of unicode properties', () => {
 			const testFn = () => ( new RegExp( '\\p{L}', 'u' ) ).test( 'ć' );
 
-			if ( featureDetection.isUnicodePropertySupported ) {
+			if ( regExpFeatureDetection.isUnicodePropertySupported ) {
 				expect( testFn() ).to.be.true;
 			} else {
 				expect( testFn ).to.throw();