浏览代码

Minor updates to docs

101arrowz 4 年之前
父节点
当前提交
d273bebdcb
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      README.md
  2. 2 2
      demo/components/code-box/index.tsx

+ 1 - 1
README.md

@@ -361,7 +361,7 @@ Other than that, `fflate` is completely ES3, meaning you probably won't even nee
 ## Testing
 You can validate the performance of `fflate` with `npm`/`yarn`/`pnpm` `test`. It validates that the module is working as expected, ensures the outputs are no more than 5% larger than competitors at max compression, and outputs performance metrics to `test/results`.
 
-Note that the time it takes for the CLI to show the completion of each test is not representative of the time each package took, so please check the JSON output if you want accurate masurements.
+Note that the time it takes for the CLI to show the completion of each test is not representative of the time each package took, so please check the JSON output if you want accurate measurements.
 
 ## License
 

+ 2 - 2
demo/components/code-box/index.tsx

@@ -45,7 +45,7 @@ var processFile = function(i) {
 
       /*
       level: ALREADY_COMPRESSED.indexOf(
-        file.name.slice(file.name.lastIndexOf('.') + 1)
+        file.name.slice(file.name.lastIndexOf('.') + 1).toLowerCase()
       ) == -1 ? 6 : 0
       */
 
@@ -147,7 +147,7 @@ var ALREADY_COMPRESSED = [
 // Yet again, this is necessary for parallelization.
 var processFile = function(i) {
   var file = files[i];
-  var ext = file.name.slice(file.name.lastIndexOf('.') + 1);
+  var ext = file.name.slice(file.name.lastIndexOf('.') + 1).toLowerCase();
   fileToU8(file, function(buf) {
     // With fflate, we can choose which files we want to compress
     zipObj[file.name] = [buf, {