We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update example to @tokenizer/http v0.5.0
const {HttpTokenizer} = require('@tokenizer/http'); const FileType = require('file-type'); const config = { avoidHeadRequests: true }; const audioTrackUrl = 'https://test-audio.netlify.com/Various%20Artists%20-%202009%20-%20netBloc%20Vol%2024_%20tiuqottigeloot%20%5BMP3-V2%5D/01%20-%20Diablo%20Swing%20Orchestra%20-%20Heroines.mp3'; (async () => { const httpTokenizer = HttpTokenizer.fromUrl(audioTrackUrl, config); await httpTokenizer.init(); const fileType = await FileType.fromTokenizer(httpTokenizer); console.log(fileType); // { ext: 'mp3', mime: 'audio/mpeg' } })();
to something like:
const {makeTokenizer} = require('@tokenizer/http'); const FileType = require('file-type'); const config = { avoidHeadRequests: true }; const audioTrackUrl = 'https://test-audio.netlify.com/Various%20Artists%20-%202009%20-%20netBloc%20Vol%2024_%20tiuqottigeloot%20%5BMP3-V2%5D/01%20-%20Diablo%20Swing%20Orchestra%20-%20Heroines.mp3'; (async () => { const httpTokenizer = await makeTokenizer(audioTrackUrl, config); const fileType = await FileType.fromTokenizer(httpTokenizer); console.log(fileType); // { ext: 'mp3', mime: 'audio/mpeg' } })();
Pending merge: #285, #286
The text was updated successfully, but these errors were encountered:
fromTokenizer()
Successfully merging a pull request may close this issue.
Update example to @tokenizer/http v0.5.0
to something like:
Pending merge: #285, #286
The text was updated successfully, but these errors were encountered: