Comparing version 1.0.0 to 1.1.0
@@ -0,1 +1,8 @@ | ||
# [1.1.0](http://github.com/waynevanson/fs-fp-ts/compare/v1.0.0...v1.1.0) (2021-02-25) | ||
### Features | ||
* use NodeJS.ArrayBufferView for data, remmoves encoding from writeFile ([c2f5d31](http://github.com/waynevanson/fs-fp-ts/commit/c2f5d3169e6526cb5a4eca8855f9ef9af099bf7e)) | ||
# 1.0.0 (2021-02-25) | ||
@@ -2,0 +9,0 @@ |
/// <reference types="node" /> | ||
import { taskEither as TE } from "fp-ts"; | ||
import { Flags, PathLikeOrFD, WriteableData, WriteFileOptions } from "./types"; | ||
import { Flags, PathLikeOrFD, WriteFileOptions } from "./types"; | ||
export declare const readFile: (flag: Flags) => (path: PathLikeOrFD) => TE.TaskEither<NodeJS.ErrnoException, Buffer>; | ||
export declare const writeFile: (options?: WriteFileOptions) => (path: PathLikeOrFD) => (data: WriteableData) => TE.TaskEither<NodeJS.ErrnoException, void>; | ||
export declare const writeFile: (options?: WriteFileOptions) => (path: PathLikeOrFD) => (data: NodeJS.ArrayBufferView) => TE.TaskEither<NodeJS.ErrnoException, void>; |
@@ -22,3 +22,2 @@ /// <reference types="node" /> | ||
export declare type WriteFileOptions = { | ||
encoding?: BufferEncoding; | ||
flags?: Flags; | ||
@@ -25,0 +24,0 @@ mode?: FileMode; |
/// <reference types="node" /> | ||
import { taskEither as TE } from "fp-ts"; | ||
import { Flags, PathLikeOrFD, WriteableData, WriteFileOptions } from "./types"; | ||
import { Flags, PathLikeOrFD, WriteFileOptions } from "./types"; | ||
export declare const readFile: (flag: Flags) => (path: PathLikeOrFD) => TE.TaskEither<NodeJS.ErrnoException, Buffer>; | ||
export declare const writeFile: (options?: WriteFileOptions) => (path: PathLikeOrFD) => (data: WriteableData) => TE.TaskEither<NodeJS.ErrnoException, void>; | ||
export declare const writeFile: (options?: WriteFileOptions) => (path: PathLikeOrFD) => (data: NodeJS.ArrayBufferView) => TE.TaskEither<NodeJS.ErrnoException, void>; |
@@ -22,3 +22,2 @@ /// <reference types="node" /> | ||
export declare type WriteFileOptions = { | ||
encoding?: BufferEncoding; | ||
flags?: Flags; | ||
@@ -25,0 +24,0 @@ mode?: FileMode; |
{ | ||
"name": "fs-fp-ts", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"files": [ | ||
@@ -5,0 +5,0 @@ "dist" |
# fs-fp-ts | ||
`fp-ts` bindings for the Node File System API's | ||
`fp-ts` bindings for the Node File System API's. | ||
Most are covered, but some are left out due to their immutable nature. | ||
We could cover this, but it's not a required feature for `v1.x` | ||
In future, we'll move this to `fp-ts-node/fs` or something similar. | ||
## Feedback | ||
This is in early stages and not complete yet, almost usable. | ||
If there are any changes you want to see, even if small, please raise an issue. | ||
## Goals | ||
- [ ] All existing `fs` API's but functional. | ||
- [ ] Stricter types. | ||
- [ ] Better types. | ||
- [ ] Sensible and standard overloads across library. | ||
## Installation | ||
Requires `Typescript ^4.x` so that param argumnents can be modified nicely with functions. | ||
### Yarn | ||
`fp-ts-node` has a peer dependency of `fp-ts`. | ||
```ts | ||
// yarn | ||
yarn add fs-fp-ts fp-ts | ||
``` | ||
// npm | ||
### NPM | ||
```ts | ||
npm install fs-fp-ts fp-ts | ||
``` |
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
33101
451
20