Skip to content

Commit

Permalink
Meta tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Apr 16, 2020
1 parent 8f3a08d commit 8717fc4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import {FileTypeResult, ReadableStreamWithFileType, FileExtension, MimeType} fro
import FileTypeBrowser = require('./browser');
import {FileTypeResult as FileTypeResultBrowser} from './browser';

expectType<Promise<FileTypeResult | undefined>>(FileType.fromBuffer(new Buffer([0xff, 0xd8, 0xff])));
expectType<Promise<FileTypeResult | undefined>>(FileType.fromBuffer(Buffer.from([0xff, 0xd8, 0xff])));
expectType<Promise<FileTypeResult | undefined>>(FileType.fromBuffer(new Uint8Array([0xff, 0xd8, 0xff])));
expectType<Promise<FileTypeResult | undefined>>(FileType.fromBuffer(new ArrayBuffer(42)));

(async () => {
const result = await FileType.fromBuffer(new Buffer([0xff, 0xd8, 0xff]));
const result = await FileType.fromBuffer(Buffer.from([0xff, 0xd8, 0xff]));
if (result !== undefined) {
expectType<FileExtension>(result.ext);
expectType<MimeType>(result.mime);
Expand Down
2 changes: 1 addition & 1 deletion license
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com)
Copyright (c) Sindre Sorhus <[email protected]> (https://sindresorhus.com)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"author": {
"name": "Sindre Sorhus",
"email": "[email protected]",
"url": "sindresorhus.com"
"url": "https://sindresorhus.com"
},
"engines": {
"node": ">=8"
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# file-type [![Build Status](https://travis-ci.org/sindresorhus/file-type.svg?branch=master)](https://travis-ci.org/sindresorhus/file-type)
# file-type [![Build Status](https://travis-ci.com/sindresorhus/file-type.svg?branch=master)](https://travis-ci.ocomrg/sindresorhus/file-type)

> Detect the file type of a Buffer/Uint8Array/ArrayBuffer
Expand Down

0 comments on commit 8717fc4

Please sign in to comment.