Comparing version 1.2.1 to 1.2.2
@@ -5,3 +5,3 @@ 'use strict'; | ||
const url = require('url'); | ||
const { JSONP_CONFIG, JSONP_WRAPPER } = require('../../lib/private_key'); | ||
const { JSONP_CONFIG } = require('../../lib/private_key'); | ||
@@ -68,3 +68,3 @@ module.exports = { | ||
// generate jsonp body | ||
this[JSONP_WRAPPER](this.body); | ||
this.createJsonpBody(this.body); | ||
}; | ||
@@ -71,0 +71,0 @@ }, |
'use strict'; | ||
const jsonpBody = require('jsonp-body'); | ||
const { JSONP_CONFIG, JSONP_WRAPPER } = require('../../lib/private_key'); | ||
const { JSONP_CONFIG } = require('../../lib/private_key'); | ||
@@ -15,8 +15,9 @@ module.exports = { | ||
/** | ||
* jsonp wrap body function | ||
* set jsonp response wrap function, other plugin can use it. | ||
* JSONP wrap body function | ||
* Set jsonp response wrap function, other plugin can use it. | ||
* If not necessary, please don't use this method in your application code. | ||
* @param {Object} body respones body | ||
* @public | ||
* @private | ||
*/ | ||
[JSONP_WRAPPER](body) { | ||
createJsonpBody(body) { | ||
const jsonpConfig = this[JSONP_CONFIG]; | ||
@@ -23,0 +24,0 @@ if (!jsonpConfig || !jsonpConfig.jsonpFunction) { |
1.2.2 / 2017-11-10 | ||
================== | ||
**fixes** | ||
* [[`d14d2d6`](http://github.com/eggjs/egg-jsonp/commit/d14d2d6aa1cdc50ff084f801fa741221667ee577)] - fix: rename to createJsonpBody (#9) (Yiyu He <<dead_horse@qq.com>>) | ||
**others** | ||
* [[`f7137a0`](http://github.com/eggjs/egg-jsonp/commit/f7137a011b202882fbfd48a4ee434031a9b950d2)] - chore: add pkgfiles check in ci (dead-horse <<dead_horse@qq.com>>) | ||
1.2.1 / 2017-10-11 | ||
@@ -3,0 +12,0 @@ ================== |
'use strict'; | ||
exports.JSONP_CONFIG = Symbol('jsonp#config'); | ||
exports.JSONP_WRAPPER = Symbol.for('jsonp#wrapper'); |
{ | ||
"name": "egg-jsonp", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "jsonp support for egg", | ||
@@ -45,3 +45,3 @@ "eggPlugin": { | ||
"lint": "eslint .", | ||
"ci": "npm run lint && npm run cov", | ||
"ci": "npm run lint && npm run cov && egg-bin pkgfiles --check", | ||
"autod": "autod" | ||
@@ -48,0 +48,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11824