...

Benchmark created on


Setup

const allowedExtensions = [
      'doc',
      'docx',
      'eml',
      'gif',
      'htm',
      'html',
      'jpeg',
      'jpg',
      'json',
      'mp4',
      'msg',
      'odp',
      'odt',
      'pdf',
      'png',
      'ppt',
      'pptx',
      'rtf',
      'tif',
      'tiff',
      'txt',
      'xls',
      'xlsm',
      'xlsx',
    ];

Test runner

Ready to run.

Testing in
TestOps/sec
stringify
const s = JSON.stringify(allowedExtensions)
;
const p = JSON.parse(s);
ready
equal
const prevExtensions = [
      'doc',
      'docx',
      'eml',
      'gif',
      'htm',
      'html',
      'jpeg',
      'jpg',
      'json',
      'mp4',
      'msg',
      'odp',
      'odt',
      'pdf',
      'png',
      'ppt',
      'pptx',
      'rtf',
      'tif',
      'tiff',
      'txt',
      'xls',
      'xlsm',
      'xlsx',
    ];
    
const isEqual = allowedExtensions.every((e, index) => Object.is(prevExtensions[index], e))
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.