@smpx/koa-request 1.0.2 → 1.0.4

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/Request.js +5 -2
  2. package/package.json +1 -1
package/Request.js CHANGED
@@ -790,7 +790,7 @@ class Request {
790
790
  }
791
791
 
792
792
  isApp() {
793
- return this.appInfo().type === 'app';
793
+ return this.appInfo().appType === 'app';
794
794
  }
795
795
 
796
796
  isAndroidApp() {
@@ -1078,7 +1078,10 @@ class Request {
1078
1078
  }
1079
1079
 
1080
1080
  isSearchIP() {
1081
- return IPRange.isSearchIp(this.ip());
1081
+ if (this._issip === undefined) {
1082
+ this._issip = IPRange.isSearchIp(this.ip());
1083
+ }
1084
+ return this._issip;
1082
1085
  }
1083
1086
 
1084
1087
  isGet() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smpx/koa-request",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Handle basic tasks for koajs",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",