textarea-markdown
Advanced tools
Comparing version 1.3.11 to 1.3.12
@@ -15,4 +15,2 @@ "use strict"; | ||
var _fileType = require("file-type"); | ||
var _filesize = require("filesize"); | ||
@@ -24,2 +22,4 @@ | ||
var FileType = require('file-type/browser'); | ||
var TextareaMarkdown = function () { | ||
@@ -157,3 +157,3 @@ function TextareaMarkdown(textarea) { | ||
var bytes = new Uint8Array(reader.result); | ||
var fileType = await (0, _fileType.fileTypeFromStream)(bytes)["ext"]; | ||
var fileType = await FileType.fromStream(bytes)["ext"]; | ||
var fileSize = (0, _filesize.filesize)(file.size, { base: 10, standard: "jedec" }); | ||
@@ -160,0 +160,0 @@ var text = "![" + _this5.options["placeholder"].replace(/\%filename/, file.name) + "]()"; |
{ | ||
"name": "textarea-markdown", | ||
"version": "1.3.11", | ||
"version": "1.3.12", | ||
"description": "Make textarea a markdown editor.", | ||
@@ -19,3 +19,3 @@ "main": "lib/textarea-markdown.js", | ||
"dependencies": { | ||
"file-type": "^18.5.0", | ||
"file-type": "^16.5.4", | ||
"filesize": "^10.0.5", | ||
@@ -22,0 +22,0 @@ "markdown-it": "^12.3.2", |
import "whatwg-fetch"; | ||
import MarkdownIt from "markdown-it"; | ||
import { fileTypeFromStream } from "file-type"; | ||
const FileType = require('file-type/browser'); | ||
import { filesize } from "filesize"; | ||
@@ -105,3 +105,3 @@ | ||
const bytes = new Uint8Array(reader.result); | ||
const fileType = await fileTypeFromStream(bytes)["ext"]; | ||
const fileType = await FileType.fromStream(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
18844
+ Addedfile-type@16.5.4(transitive)
+ Addedpeek-readable@4.1.0(transitive)
+ Addedstrtok3@6.3.0(transitive)
+ Addedtoken-types@4.2.1(transitive)
- Removedfile-type@18.7.0(transitive)
- Removedpeek-readable@5.3.1(transitive)
- Removedstrtok3@7.1.1(transitive)
- Removedtoken-types@5.0.1(transitive)
Updatedfile-type@^16.5.4