Skip to content

Commit

Permalink
Require Node.js 6
Browse files Browse the repository at this point in the history
Closes #137
  • Loading branch information
sindresorhus committed May 6, 2018
1 parent ab40601 commit fa07fcd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: node_js
node_js:
- '10'
- '8'
- '6'
- '4'
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
'use strict';
const toBytes = s => Array.from(s).map(c => c.charCodeAt(0));
const toBytes = s => [...s].map(c => c.charCodeAt(0));
const xpiZipFilename = toBytes('META-INF/mozilla.rsa');
const oxmlContentTypes = toBytes('[Content_Types].xml');
const oxmlRels = toBytes('_rels/.rels');

module.exports = input => {
const buf = (input instanceof Uint8Array) ? input : new Uint8Array(input);
const buf = input instanceof Uint8Array ? input : new Uint8Array(input);

if (!(buf && buf.length > 1)) {
return null;
Expand Down Expand Up @@ -278,7 +278,7 @@ module.exports = input => {

if (idPos !== -1) {
const docTypePos = idPos + 3;
const findDocType = type => Array.from(type).every((c, i) => sliced[docTypePos + i] === c.charCodeAt(0));
const findDocType = type => [...type].every((c, i) => sliced[docTypePos + i] === c.charCodeAt(0));

if (findDocType('matroska')) {
return {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"url": "sindresorhus.com"
},
"engines": {
"node": ">=4"
"node": ">=6"
},
"scripts": {
"test": "xo && ava"
Expand Down

0 comments on commit fa07fcd

Please sign in to comment.