0.5.0 • Published 4 years ago

functional-folder v0.5.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

functional-folder

functional-folder

Index

External modules

functional-folder

functional-folder

Interfaces

functional-folder"File"Attributes

Interface: Attributes

Hierarchy

  • Attributes

Index

Properties

Properties

folder

folder: string

Defined in File.ts:19


id

id: string

Defined in File.ts:18


name

name: string

Defined in File.ts:20


type

type: FT.FileType

Defined in File.ts:21

functional-folder"File"Metadata

Interface: Metadata

Hierarchy

  • Metadata

Index

Properties

Properties

bucket

bucket: string

Defined in File.ts:30


content_type

content_type: string

Defined in File.ts:32


created_at

created_at: string

Defined in File.ts:34


generation

generation: string

Defined in File.ts:31


id

id: string

Defined in File.ts:26


kind

kind: string

Defined in File.ts:25


media_link

media_link: string

Defined in File.ts:28


name

name: string

Defined in File.ts:29


self_link

self_link: string

Defined in File.ts:27


size

size: string

Defined in File.ts:33


updated_at

updated_at: string

Defined in File.ts:35

functional-folder"Folder"Folder

Interface: Folder

Hierarchy

  • Folder

Index

Properties

Properties

created_at

created_at: string

Defined in Folder.ts:8


id

id: string

Defined in Folder.ts:6


name

name: string

Defined in Folder.ts:7


updated_at

updated_at: string

Defined in Folder.ts:9

Modules

functional-folder"Arbitraries"

External module: "Arbitraries"

Index

Functions

Functions

Const file

file(): Arbitrary‹File

Defined in Arbitraries.ts:47

Returns: Arbitrary‹File


Const filesByType

filesByType(): Arbitrary‹FilesByType

Defined in Arbitraries.ts:57

Returns: Arbitrary‹FilesByType


Const folder

folder(): Arbitrary‹Folder

Defined in Arbitraries.ts:30

Returns: Arbitrary‹Folder


Const invalidFolderObject

invalidFolderObject(): Arbitrary‹Record‹string, any››

Defined in Arbitraries.ts:6

Returns: Arbitrary‹Record‹string, any››


Const metadata

metadata(): Arbitrary‹Metadata

Defined in Arbitraries.ts:32

Returns: Arbitrary‹Metadata


Const nonFolderObject

nonFolderObject(): Arbitrary‹unknown›

Defined in Arbitraries.ts:17

Returns: Arbitrary‹unknown›

functional-folder"DateTime"

External module: "DateTime"

Index

Variables

Functions

Variables

Const getCurrentUnixTimestamp

getCurrentUnixTimestamp: function = Date.now

Defined in DateTime.ts:14

getCurrentUnixTimestamp :: () -> Int
Type declaration:

▸ (): number

Functions

Const getCurrentDate

getCurrentDate(): Date

Defined in DateTime.ts:16

Returns: Date


Const getUnixTimestamp

getUnixTimestamp(date: Date): number

Defined in DateTime.ts:6

getUnixTimestamp :: Date -> Int

Parameters:

NameType
dateDate

Returns: number

functional-folder"File"

External module: "File"

Index

Interfaces

Type aliases

Variables

Functions

Type aliases

File

Ƭ File: Attributes & object

Defined in File.ts:38


FilesByType

Ƭ FilesByType: Record‹FT.FileType, File[]›

Defined in File.ts:40

Variables

Const getAttributesFromName

getAttributesFromName: function = pipe( split('/'), E.fromPredicate( (segments: string[]) => segments.length === 2, () => new Error('Invalid file name format.') ), E.map((folder, name) => ({ id: join('/')(folder, name), folder, name, })) )

Defined in File.ts:119

getAttributesFromName :: String -> Either Attributes Error
Type declaration:

▸ (name: string): E.Either‹Error, Omit‹Attributes, "type"››

Parameters:

NameType
namestring

Functions

Const fromMetadata

fromMetadata(metadata: Metadata): Left‹Error› | Right‹object›

Defined in File.ts:139

fromMetadata :: Metadata -> Either

Parameters:

NameType
metadataMetadata

Returns: Left‹Error› | Right‹object›


Const isFile

isFile(a: unknown): a is File

Defined in File.ts:92

isFile :: a -> bool

Parameters:

NameType
aunknown

Returns: a is File


Const isFileArray

isFileArray(a: unknown): a is File[]

Defined in File.ts:100

isFileArray :: a -> bool

Parameters:

NameType
aunknown

Returns: a is File[]


Const isFilesByType

isFilesByType(a: unknown): a is FilesByType

Defined in File.ts:108

isFilesByType :: a -> bool

Parameters:

NameType
aunknown

Returns: a is FilesByType


Const isMetadata

isMetadata(a: unknown): a is Metadata

Defined in File.ts:69

isMetadata :: a -> bool

Parameters:

NameType
aunknown

Returns: a is Metadata

functional-folder"Folder"

External module: "Folder"

Index

Interfaces

Functions

Functions

Const isFolder

isFolder(a: unknown): a is Folder

Defined in Folder.ts:17

isFolder -> bool

Parameters:

NameType
aunknown

Returns: a is Folder


Const makeFolder

makeFolder(name: string): object

Defined in Folder.ts:31

makeFolder :: String -> Folder

Parameters:

NameType
namestring

Returns: object

  • created_at: string = dateStr

  • id: string = getRandomId()

  • name: string = name

  • updated_at: string = dateStr

functional-folder"index"

External module: "index"

Index

References

References

Attributes

Attributes:


File

File:


FilesByType

FilesByType:


Folder

Folder:


Metadata

Metadata:


fromMetadata

fromMetadata:


getAttributesFromName

getAttributesFromName:


isFile

isFile:


isFileArray

isFileArray:


isFilesByType

isFilesByType:


isFolder

isFolder:


isMetadata

isMetadata:


makeFolder

makeFolder:

functional-folder"String"

External module: "String"

Index

Functions

Functions

Const getRandomId

getRandomId(): string

Defined in String.ts:8

getRandomId :: () -> String

Returns: string

0.5.0

4 years ago

0.4.9

4 years ago

0.4.10

4 years ago

0.4.11

4 years ago

0.4.6

4 years ago

0.4.5

4 years ago

0.4.4

4 years ago

0.4.3

4 years ago

0.3.9

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.4.2

4 years ago

0.3.8

4 years ago

0.3.7

4 years ago

0.3.6

4 years ago

0.3.5

4 years ago

0.3.4

4 years ago

0.3.3

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago