Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fs-fp-ts

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fs-fp-ts - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

7

CHANGELOG.md

@@ -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 @@

4

dist/cjs/fs/fs.d.ts
/// <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
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc