textarea-markdown
Advanced tools
Comparing version 1.3.10 to 1.3.11
@@ -15,3 +15,3 @@ "use strict"; | ||
var _filetype = require("@komagata/filetype"); | ||
var _fileType = require("file-type"); | ||
@@ -154,5 +154,5 @@ var _filesize = require("filesize"); | ||
reader.readAsArrayBuffer(file); | ||
reader.onload = function () { | ||
reader.onload = async function () { | ||
var bytes = new Uint8Array(reader.result); | ||
var fileType = (0, _filetype.detect)(bytes); | ||
var fileType = await (0, _fileType.fileTypeFromStream)(bytes)["ext"]; | ||
var fileSize = (0, _filesize.filesize)(file.size, { base: 10, standard: "jedec" }); | ||
@@ -159,0 +159,0 @@ var text = "![" + _this5.options["placeholder"].replace(/\%filename/, file.name) + "]()"; |
{ | ||
"name": "textarea-markdown", | ||
"version": "1.3.10", | ||
"version": "1.3.11", | ||
"description": "Make textarea a markdown editor.", | ||
@@ -19,3 +19,3 @@ "main": "lib/textarea-markdown.js", | ||
"dependencies": { | ||
"@komagata/filetype": "^1.0.1", | ||
"file-type": "^18.5.0", | ||
"filesize": "^10.0.5", | ||
@@ -22,0 +22,0 @@ "markdown-it": "^12.3.2", |
import "whatwg-fetch"; | ||
import MarkdownIt from "markdown-it"; | ||
import { detect } from "@komagata/filetype"; | ||
import { fileTypeFromStream } from "file-type"; | ||
import { filesize } from "filesize"; | ||
@@ -103,5 +103,5 @@ | ||
reader.readAsArrayBuffer(file); | ||
reader.onload = () => { | ||
reader.onload = async () => { | ||
const bytes = new Uint8Array(reader.result); | ||
const fileType = detect(bytes); | ||
const fileType = await fileTypeFromStream(bytes)["ext"]; | ||
const fileSize = filesize(file.size, { base: 10, standard: "jedec" }); | ||
@@ -108,0 +108,0 @@ const text = |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18851
+ Addedfile-type@^18.5.0
+ Added@tokenizer/token@0.3.0(transitive)
+ Addedfile-type@18.7.0(transitive)
+ Addedieee754@1.2.1(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedpeek-readable@5.3.1(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedreadable-web-to-node-stream@3.0.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedstrtok3@7.1.1(transitive)
+ Addedtoken-types@5.0.1(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
- Removed@komagata/filetype@^1.0.1
- Removed@komagata/filetype@1.0.1(transitive)
- Removedmagic-bytes.js@1.10.0(transitive)