1.4.15 • Published 3 years ago

file-box v1.4.15

Weekly downloads
719
License
Apache-2.0
Repository
github
Last release
3 years ago

FILEBOX

Pack a file in a Box for easy transport between servers with the least payload, no mater than where it is.(local path, remote url, or cloud storage)

File Box

WIP

WORKING IN PROGRESS ...

PLEASE COME BACK AFTER 4 WEEKS ...

FEATURES

  1. Present A File by Abstracting It's Meta Information that supports Reading & toJSON() API.
  2. Follow DOM File/BLOB Interface
  3. Present a file that could be: Local, Remote, Stream
  4. Lazy load
  5. Serializable
  6. Can be Transfered from server to server, server to browser.

SCHEMAS

Url

Node.js Documentation > URL Strings and URL Objects

┌─────────────────────────────────────────────────────────────────────────────────────────────┐
│                                            href                                             │
├──────────┬──┬─────────────────────┬─────────────────────┬───────────────────────────┬───────┤
│ protocol │  │        auth         │        host         │           path            │ hash  │
│          │  │                     ├──────────────┬──────┼──────────┬────────────────┤       │
│          │  │                     │   hostname   │ port │ pathname │     search     │       │
│          │  │                     │              │      │          ├─┬──────────────┤       │
│          │  │                     │              │      │          │ │    query     │       │
"  https:   //    user   :   pass   @ sub.host.com : 8080   /p/a/t/h  ?  query=string   #hash "
│          │  │          │          │   hostname   │ port │          │                │       │
│          │  │          │          ├──────────────┴──────┤          │                │       │
│ protocol │  │ username │ password │        host         │          │                │       │
├──────────┴──┼──────────┴──────────┼─────────────────────┤          │                │       │
│   origin    │                     │       origin        │ pathname │     search     │ hash  │
├─────────────┴─────────────────────┴─────────────────────┴──────────┴────────────────┴───────┤
│                                            href                                             │
└─────────────────────────────────────────────────────────────────────────────────────────────┘

Path

Node.js Documentation > path.parse(path)

┌─────────────────────┬────────────┐
│          dir        │    base    │
├──────┬              ├──────┬─────┤
│ root │              │ name │ ext │
"  /    home/user/dir / file  .txt "
└──────┴──────────────┴──────┴─────┘

SEE ALSO

THANKS

This module is inspired by https://github.com/gulpjs/vinyl and https://github.com/DefinitelyTyped/DefinitelyTyped/pull/12368 when I need a virtual File module for my Chatie project.

AUTHOR

Huan LI \zixia@zixia.net\

COPYRIGHT & LICENSE

  • Code & Docs © 2016-2018 Huan LI \zixia@zixia.net\
  • Code released under the Apache-2.0 License
  • Docs released under Creative Commons
1.5.5

3 years ago

1.5.4

3 years ago

1.5.3

3 years ago

1.5.1

3 years ago

1.4.11

3 years ago

1.4.10

3 years ago

1.4.13

3 years ago

1.4.12

3 years ago

1.4.15

3 years ago

1.4.14

3 years ago

1.4.9

3 years ago

1.4.8

3 years ago

1.4.7

3 years ago

1.2.8

3 years ago

1.2.7

3 years ago

1.2.6

3 years ago

1.2.5

3 years ago

1.2.10

3 years ago

1.2.9

3 years ago

1.4.5

3 years ago

1.4.4

3 years ago

1.4.3

3 years ago

1.4.1

3 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.0.6

3 years ago

1.0.2

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

0.19.3

3 years ago

0.19.4

3 years ago

0.19.5

3 years ago

0.23.6

3 years ago

0.23.5

3 years ago

0.23.4

3 years ago

0.23.3

3 years ago

0.23.2

3 years ago

0.21.4

3 years ago

0.21.3

3 years ago

0.21.2

3 years ago

0.23.8

3 years ago

0.23.7

3 years ago

0.23.12

3 years ago

0.17.12

3 years ago

0.17.10

3 years ago

0.17.11

3 years ago

0.17.6

3 years ago

0.17.7

3 years ago

0.17.8

3 years ago

0.17.9

3 years ago

0.16.8

4 years ago

0.16.7

4 years ago

0.16.6

4 years ago

0.16.3

4 years ago

0.16.4

4 years ago

0.16.2

4 years ago

0.16.1

4 years ago

0.15.1

4 years ago

0.15.0

4 years ago

0.14.3

4 years ago

0.14.2

4 years ago

0.13.9

4 years ago

0.13.5

4 years ago

0.13.4

4 years ago

0.13.3

4 years ago

0.13.2

4 years ago

0.13.1

4 years ago

0.12.8

5 years ago

0.12.7

5 years ago

0.12.4

5 years ago

0.12.3

5 years ago

0.12.2

5 years ago

0.12.1

5 years ago

0.11.7

5 years ago

0.10.6

5 years ago

0.9.7

5 years ago

0.9.5

5 years ago

0.9.3

5 years ago

0.8.27

6 years ago

0.8.26

6 years ago

0.8.24

6 years ago

0.8.23

6 years ago

0.8.22

6 years ago

0.8.21

6 years ago

0.8.20

6 years ago

0.8.19

6 years ago

0.8.14

6 years ago

0.8.13

6 years ago

0.8.12

6 years ago

0.8.11

6 years ago

0.8.10

6 years ago

0.8.9

6 years ago

0.8.8

6 years ago

0.8.7

6 years ago

0.8.6

6 years ago

0.8.5

6 years ago

0.8.4

6 years ago

0.8.3

6 years ago

0.8.1

6 years ago

0.6.13

6 years ago

0.6.12

6 years ago

0.6.11

6 years ago

0.6.10

6 years ago

0.6.9

6 years ago

0.6.8

6 years ago

0.6.7

6 years ago

0.6.6

6 years ago

0.6.5

6 years ago

0.6.4

6 years ago

0.6.3

6 years ago

0.6.2

6 years ago

0.4.1

6 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.1.2

7 years ago

0.0.1

7 years ago