New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@contactlab/appy

Package Overview
Dependencies
Maintainers
3
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contactlab/appy - npm Package Compare versions

Comparing version

to
2.0.0

lib/es6/examples/get-and-post-album.js

46

package.json
{
"name": "@contactlab/appy",
"version": "1.4.0",
"version": "2.0.0",
"description": "Fetch API the Contactlab way",

@@ -42,21 +42,34 @@ "main": "lib/index.js",

"dependencies": {
"fp-ts": "^1.19.0",
"io-ts": "^1.8.0"
"fp-ts": "^2.0.5",
"io-ts": "^2.0.1"
},
"devDependencies": {
"@babel/register": "7.5.5",
"@contactlab/tslint-config": "1.3.0",
"@types/jest": "24.0.15",
"@types/node": "^12.0.0",
"husky": "2.4.1",
"jest": "24.8.0",
"@types/isomorphic-fetch": "0.0.35",
"@types/jest": "24.0.18",
"@types/node": "12.7.3",
"babel-plugin-istanbul": "5.2.0",
"husky": "3.0.4",
"isomorphic-fetch": "2.2.1",
"jest": "24.9.0",
"jest-fetch-mock": "2.1.2",
"prettier": "1.18.2",
"pretty-quick": "1.11.1",
"rimraf": "2.6.3",
"rimraf": "3.0.0",
"ts-jest": "24.0.2",
"ts-node": "8.3.0",
"tslint": "5.18.0",
"tslint": "5.19.0",
"tslint-config-prettier": "1.18.0",
"typescript": "3.5.2"
"typescript": "3.6.2"
},
"babel": {
"env": {
"test": {
"plugins": [
"istanbul"
]
}
}
},
"jest": {

@@ -66,3 +79,3 @@ "automock": false,

"coveragePathIgnorePatterns": [
"<rootDir>/test/_helpers/",
"<rootDir>/src/test/_helpers/",
"<rootDir>/node_modules/"

@@ -74,5 +87,5 @@ ],

"roots": [
"<rootDir>/test/"
"<rootDir>/src/test/"
],
"testRegex": "(\\.|/)spec\\.(js|ts)$",
"testRegex": "(\\.|/)spec\\.ts$",
"moduleFileExtensions": [

@@ -92,2 +105,9 @@ "js",

},
"nyc": {
"require": [
"@babel/register"
],
"sourceMap": false,
"instrument": false
},
"husky": {

@@ -94,0 +114,0 @@ "hooks": {

@@ -40,2 +40,3 @@ # Appy

```typescript
import {fold} from 'fp-ts/lib/Either';
import {get} from '@contactlab/appy';

@@ -45,7 +46,5 @@ // same as:

get('http://jsonplaceholder.typicode.com/posts')
.run()
.then(result =>
result.fold(err => console.error(err), data => console.log(data))
);
const request = get('http://jsonplaceholder.typicode.com/posts');
request().then(fold(err => console.error(err), data => console.log(data)));
```

@@ -66,3 +65,3 @@

- request `method` is always explicit (no implicit "GET");
- accepted methods are definened by the `Method` union type;
- accepted methods are definened by the [`Method`](src/request.ts) union type;
- `fetch`'s input is always a `string` (no `Request` objects allowed);

@@ -125,2 +124,3 @@ - standard `Response` is mapped into a specific Appy's `Response<Mixed>` interface;

```typescript
import {fold} from 'fp-ts/lib/Either';
import * as t from 'io-ts';

@@ -142,8 +142,5 @@ import {api} from '@contactlab/appy';

myApi
.get('/posts', {token, decoder: Posts})
.run()
.then(result =>
result.fold(err => console.error(err), data => console.log(data))
);
const request = myApi.get('/posts', {token, decoder: Posts});
request().then(fold(err => console.error(err), data => console.log(data)));
```

@@ -150,0 +147,0 @@