Skip to content

Commit 33b9bf4

Browse files
chore(release): 5.5.0 [skip ci]
# [5.5.0](Rapsssito/react-native-tcp-socket@v5.4.0...v5.5.0) (2021-10-26) ### Features * Add isIP & isIPv4 & isIPv6 methods ([Rapsssito#133](Rapsssito#133)) ([5498814](Rapsssito@5498814))
1 parent 5498814 commit 33b9bf4

File tree

4 files changed

+34
-1
lines changed

4 files changed

+34
-1
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# [5.5.0](https://github.com/Rapsssito/react-native-tcp-socket/compare/v5.4.0...v5.5.0) (2021-10-26)
2+
3+
4+
### Features
5+
6+
* Add isIP & isIPv4 & isIPv6 methods ([#133](https://github.com/Rapsssito/react-native-tcp-socket/issues/133)) ([5498814](https://github.com/Rapsssito/react-native-tcp-socket/commit/5498814022272385ee8e2492f998c58d12773a43))
7+
18
# [5.4.0](https://github.com/Rapsssito/react-native-tcp-socket/compare/v5.3.1...v5.4.0) (2021-10-26)
29

310

coverage/coverage-final.json

Lines changed: 5 additions & 0 deletions
Large diffs are not rendered by default.

lib/types/index.d.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
declare namespace _default {
22
export { createServer };
33
export { createConnection };
4+
export { isIP };
5+
export { isIPv4 };
6+
export { isIPv6 };
47
export { Server };
58
export { Socket };
69
}
@@ -16,5 +19,23 @@ declare function createServer(connectionListener: (socket: Socket) => void): Ser
1619
* @returns {Socket}
1720
*/
1821
declare function createConnection(options: import('./Socket').ConnectionOptions, callback: () => void): Socket;
22+
/**
23+
* Tests if input is an IP address. Returns `0` for invalid strings, returns `4` for IP version 4 addresses, and returns `6` for IP version 6 addresses.
24+
*
25+
* @param {string} input
26+
*/
27+
declare function isIP(input: string): 0 | 4 | 6;
28+
/**
29+
* Returns `true` if input is a version 4 IP address, otherwise returns `false`.
30+
*
31+
* @param {string} input
32+
*/
33+
declare function isIPv4(input: string): boolean;
34+
/**
35+
* Returns `true` if input is a version 6 IP address, otherwise returns `false`.
36+
*
37+
* @param {string} input
38+
*/
39+
declare function isIPv6(input: string): boolean;
1940
import Server from "./Server";
2041
import Socket from "./Socket";

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-native-tcp-socket",
33
"title": "React Native Tcp Socket",
4-
"version": "5.4.0",
4+
"version": "5.5.0",
55
"description": "React Native TCP socket API for Android & iOS with SSL/TLS support",
66
"main": "src/index.js",
77
"types": "lib/types/index.d.ts",

0 commit comments

Comments
 (0)