Skip to content
New issue

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

TypeError: file.slice is not a function #20

Open
serkonda7 opened this issue Aug 31, 2023 · 0 comments
Open

TypeError: file.slice is not a function #20

serkonda7 opened this issue Aug 31, 2023 · 0 comments

Comments

@serkonda7
Copy link

.../node_modules/cfb/cfb.js:370
var blob = file.slice(0,512);
                ^

TypeError: file.slice is not a function
    at parse (.../node_modules/cfb/cfb.js:370:17)
    at Object.read (.../node_modules/cfb/cfb.js:688:9)

My code is this:

const cfb = CFB.read(file, { type: 'file' })
	// const cfb = CFB.parse(data)
	const vbaDirEntry = CFB.find(cfb, 'VBA')
	if (!vbaDirEntry) {
		throw new Error('VBA root not found')
	}

	const vbaDir = CFB.read(cfb, vbaDirEntry)
	const modules = {}
	for (const entry of vbaDir.FullPaths) {
		console.log(entry)
	}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant