ajax-best-promise 0.4.0 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +4 -43
  2. package/package.json +26 -35
package/README.md CHANGED
@@ -5,10 +5,10 @@ Ajax with best promise - Ajax with stream data
5
5
 
6
6
  ![extending](https://img.shields.io/badge/stability-extending-orange.svg)
7
7
  [![npm-version](https://img.shields.io/npm/v/ajax-best-promise.svg)](https://npmjs.org/package/ajax-best-promise)
8
+ [![build](https://github.com/codenautas/ajax-best-promise/actions/workflows/node.js.yml/badge.svg)](https://github.com/codenautas/ajax-best-promise/actions/workflows/node.js.yml)
8
9
  [![downloads](https://img.shields.io/npm/dm/ajax-best-promise.svg)](https://npmjs.org/package/ajax-best-promise)
9
- [![build](https://img.shields.io/travis/codenautas/ajax-best-promise/master.svg)](https://travis-ci.org/codenautas/ajax-best-promise)
10
- [![coverage](https://img.shields.io/coveralls/codenautas/ajax-best-promise/master.svg)](https://coveralls.io/r/codenautas/ajax-best-promise)
11
- [![dependencies](https://img.shields.io/david/codenautas/ajax-best-promise.svg)](https://david-dm.org/codenautas/ajax-best-promise)
10
+ [![outdated-deps](https://img.shields.io/github/issues-search/codenautas/ajax-best-globals?color=9cf&label=outdated-deps&query=is%3Apr%20author%3Aapp%2Fdependabot%20is%3Aopen)](https://github.com/codenautas/ajax-best-globals/pulls/app%2Fdependabot)
11
+
12
12
 
13
13
 
14
14
  language: ![English](https://raw.githubusercontent.com/codenautas/multilang/master/img/lang-en.png)
@@ -56,26 +56,6 @@ AjaxBestPromise.get({
56
56
  });
57
57
  ```
58
58
 
59
- ## haders
60
-
61
- You can send headers in the header property and recieve it with the `onHeader` function.
62
-
63
- ```js
64
- AjaxBestPromise.put({
65
- url:'http://example.com:3333/service/',
66
- data:{ alfa: 1, betha: 2},
67
- headers:{
68
- Authorization: 'Bearer ' + token
69
- }
70
- }).onHeaders(function(headers){
71
- newId = headers.Location;
72
- }).then(function(){
73
- console.log('data inserted', newId);
74
- }).catch(function(err){
75
- console.log('error inserting data', err);
76
- });
77
- ```
78
-
79
59
 
80
60
  ## Error handler
81
61
 
@@ -94,28 +74,9 @@ AjaxBestPromise.get({
94
74
  });
95
75
  ```
96
76
 
97
- ## Modern JS
98
-
99
- ```ts
100
- try{
101
- var newId: string
102
- await AjaxBestPromise.put({
103
- url:'http://example.com:3333/service/',
104
- data:{ alfa: 1, betha: 2},
105
- headers:{
106
- Authorization: 'Bearer ' + token
107
- }
108
- }).onHeaders(function(headers){
109
- newId = headers.Location;
110
- });
111
- console.log('data inserted', newId);
112
- }catch(err){
113
- console.log('error inserting data', err);
114
- }
115
- ```
116
-
117
77
  ## Tests with real devices
118
78
 
79
+
119
80
  NPM version |Device |OS |nav |obs
120
81
  ------------|-----------------------|---------------|-------------------------|----
121
82
  0.1.3 | Samsung Galaxy Note 4 | Android 6.0.1 | Chrome Mobile 44.0.2403 |
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ajax-best-promise",
3
3
  "description": "Ajax with best promise - Ajax with stream data",
4
- "version": "0.4.0",
4
+ "version": "0.4.3",
5
5
  "author": "Codenautas <codenautas@googlegroups.com>",
6
6
  "license": "MIT",
7
7
  "files": [
@@ -21,47 +21,38 @@
21
21
  "main": "bin/ajax-best-promise.js",
22
22
  "dependencies": {},
23
23
  "devDependencies": {
24
- "body-parser": "~1.20.2",
25
- "cookie-parser": "~1.4.6",
26
- "es6-promise": "~4.2.8",
27
- "expect.js": "~0.3.1",
28
- "express": "~4.18.2",
29
- "express-session": "~1.17.3",
30
- "express-useragent": "~1.0.15",
31
- "fs-promise": "~2.0.3",
32
- "istanbul": "~0.4.5",
33
- "karma": "~6.4.2",
34
- "karma-chrome-launcher": "~3.2.0",
35
- "karma-coverage": "~2.2.0",
36
- "karma-es3-preprocessor": "~0.1.1",
37
- "karma-expect": "~1.1.3",
38
- "karma-firefox-launcher": "~2.1.2",
39
- "karma-ie-launcher": "~1.0.0",
40
- "karma-mocha": "~2.0.1",
41
- "mocha": "~10.2.0",
42
- "moment": "~2.29.4",
43
- "multiparty": "~4.2.3",
44
- "pug": "~3.0.2",
45
- "read-yaml-promise": "~1.0.2",
46
- "mini-tools": "~1.12.0",
47
- "require-bro": "~0.3.1",
48
- "serve-content": "~0.3.18"
24
+ "body-parser": "^2.2.2",
25
+ "cookie-parser": "^1.4.7",
26
+ "expect.js": "^0.3.1",
27
+ "express": "^5.2.1",
28
+ "express-session": "^1.19.0",
29
+ "express-useragent": "^2.1.0",
30
+ "fs-promise": "^2.0.3",
31
+ "istanbul": "^0.4.5",
32
+ "karma": "^6.4.4",
33
+ "karma-chrome-launcher": "^3.2.0",
34
+ "karma-coverage": "^2.2.1",
35
+ "karma-expect": "^1.1.3",
36
+ "karma-firefox-launcher": "^2.1.3",
37
+ "karma-mocha": "^2.0.1",
38
+ "mocha": "^11.7.5",
39
+ "moment": "^2.30.1",
40
+ "multiparty": "^4.2.3",
41
+ "pug": "^3.0.3",
42
+ "read-yaml-promise": "^1.0.2",
43
+ "mini-tools": "^1.13.4",
44
+ "require-bro": "^0.3.2",
45
+ "serve-content": "^1.0.2"
49
46
  },
50
47
  "engines": {
51
- "node": ">= 8"
48
+ "node": ">= 16"
52
49
  },
53
50
  "scripts": {
54
51
  "infinito": "node examples/server/server.js --karma karma.conf.js",
55
- "test": "node examples/server/server.js --karma karma.conf.js --single-run",
52
+ "test": "echo Use test-ui to test!",
53
+ "test-ui": "node examples/server/server.js --karma karma.conf.js --single-run",
56
54
  "test-cov": "node examples/server/server.js --karma karma.conf.js --single-run",
57
55
  "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
58
56
  "start": "node examples/server/server.js"
59
- },
60
- "qa-control": {
61
- "package-version": "0.3.0",
62
- "coverage": 90,
63
- "run-in": "both",
64
- "stability": "extending",
65
- "type": "lib"
66
57
  }
67
58
  }