Comments (3)
Yes, I deleted it when refactoring to typescript.
Previously I used webpack to bundle the whole library into a single file.
I dropped the whole build system because nowadays I think it's something that's more up to the user using the library on how to bundle the modules.
from magic-bytes.
Yes, I deleted it when refactoring to typescript.
Previously I used webpack to bundle the whole library into a single file. I dropped the whole build system because nowadays I think it's something that's more up to the user using the library on how to bundle the modules.
So the documentation for html
is outdated.
// import magic-bytes.js
import { filetypename } from 'magic-bytes.js';
// add an event listener to the file input
document.getElementById("file").addEventListener('change', (event, x) => {
const fileReader = new FileReader();
fileReader.onloadend = (f) => {
// convert the file to a Uint8Array
const bytes = new Uint8Array(f.target.result);
// console.log the file type
console.log("Possible filetypes: " + filetypename(bytes))
}
fileReader.readAsArrayBuffer(event.target.files[0])
})
from magic-bytes.
I've updated the readme to reflect a new npm goal npm run example
which runs the example
from magic-bytes.
Related Issues (16)
- "types" field in package.json has incorrect path to index.d.ts
- Filetype mime HOT 2
- mp4 HOT 3
- License HOT 2
- Cannot detect apng File Type HOT 1
- filetypeinfo failing on subsequent requests HOT 2
- Is it possible to support detection of .mov files
- Issue with MKV files HOT 2
- The automated release is failing 🚨 HOT 5
- .srt & . vtt subtitle/caption file support HOT 6
- Question: dealing with false positives within same signature group HOT 2
- Detects "tda2" instead of truetype ttf HOT 1
- new file types: ELF, macho, eml HOT 1
- new file types to add
- *.hevc files support (ios video format) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magic-bytes.