Sfoglia il codice sorgente

linting and comment for readFileSync

d98762625 6 anni fa
parent
commit
367532cf8d
2 ha cambiato i file con 7 aggiunte e 2 eliminazioni
  1. 7 1
      src/core/Utils.mjs
  2. 0 1
      src/core/dishTranslationTypes/DishListFile.mjs

+ 7 - 1
src/core/Utils.mjs

@@ -1027,7 +1027,13 @@ class Utils {
     }
     }
 
 
     /**
     /**
-     * 
+     * Synchronously read the raw data from a File object.
+     *
+     * Only works in the Node environment
+     *
+     * @param {File} file - a File shim object (see src/node/File.mjs)
+     * @returns {ArrayBuffer} the data from the file in an ArrayBuffer
+     * @throws {TypeError} thrown if the method is called from a browser environment
      */
      */
     static readFileSync(file) {
     static readFileSync(file) {
         if (!Utils.isNode()) {
         if (!Utils.isNode()) {

+ 0 - 1
src/core/dishTranslationTypes/DishListFile.mjs

@@ -5,7 +5,6 @@
  */
  */
 
 
 import DishTranslationType from "./DishTranslationType";
 import DishTranslationType from "./DishTranslationType";
-import Utils from "../Utils";
 
 
 /**
 /**
  * Translation methods for ListFile Dishes
  * Translation methods for ListFile Dishes