Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit e8e1cdf

Browse files
author
Alan Shaw
committed
refactor: use normalise from ipfs-utils
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
1 parent 72d34ea commit e8e1cdf

File tree

8 files changed

+5
-240
lines changed

8 files changed

+5
-240
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"fs-extra": "^8.1.0",
5555
"glob": "^7.1.3",
5656
"ipfs-block": "~0.8.1",
57-
"ipfs-utils": "~0.0.3",
57+
"ipfs-utils": "github:ipfs/js-ipfs-utils#normalise-input",
5858
"ipld-dag-cbor": "~0.15.0",
5959
"ipld-dag-pb": "~0.17.3",
6060
"ipld-raw": "^4.0.0",

src/add/form-data.browser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
'use strict'
22
/* eslint-env browser */
33

4-
const normaliseInput = require('./normalise-input')
4+
const normaliseInput = require('ipfs-utils/src/files/normalise-input')
55

6-
exports.toFormData = async (input) => {
6+
exports.toFormData = async input => {
77
const files = normaliseInput(input)
88
const formData = new FormData()
99
let i = 0

src/add/form-data.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
const FormData = require('form-data')
44
const { Buffer } = require('buffer')
55
const toStream = require('it-to-stream')
6-
const normaliseInput = require('./normalise-input')
6+
const normaliseInput = require('ipfs-utils/src/files/normalise-input')
77

8-
exports.toFormData = async (input) => {
8+
exports.toFormData = async input => {
99
const files = normaliseInput(input)
1010
const formData = new FormData()
1111
let i = 0

src/add/normalise-input.js

Lines changed: 0 additions & 135 deletions
This file was deleted.

src/lib/blob-to-async-iterable.js

Lines changed: 0 additions & 30 deletions
This file was deleted.

src/lib/file-data-to-async-iterable.js

Lines changed: 0 additions & 55 deletions
This file was deleted.

src/lib/is-bloby.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/lib/is-bytes.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)