소스 검색

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, {