Skip to content

Commit

Permalink
chore: jswork scope
Browse files Browse the repository at this point in the history
  • Loading branch information
afeiship committed Nov 22, 2020
1 parent bd11a97 commit fc48d32
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion __tests__/index.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function () {
require('../src');

const NxBaiduFanyi = require('../src');
const sleep = require('sleep');

describe('NxBaiduFanyi.methods', function () {
Expand Down
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* description: Baidu fangyi api wrapper.
* homepage: https://github.com/afeiship/next-baidu-fanyi
* version: 1.0.0
* date: 2020-11-22 17:53:20
* date: 2020-11-22 17:59:47
* license: MIT
*/

Expand Down Expand Up @@ -52,6 +52,6 @@
});

if (typeof module !== 'undefined' && module.exports) {
module.exports = nx.baiduFanyi;
module.exports = NxBaiduFanyi;
}
})();
4 changes: 2 additions & 2 deletions dist/index.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* description: Baidu fangyi api wrapper.
* homepage: https://github.com/afeiship/next-baidu-fanyi
* version: 1.0.0
* date: 2020-11-22 17:53:20
* date: 2020-11-22 17:59:47
* license: MIT
*/
!function(){var a=(this||window||Function("return this")()).nx||require("@jswork/next"),o=require("node-fetch"),u=require("@jswork/next-delay"),s=a.fangyiApiSign||require("@jswork/next-fanyi-api-sign"),d=a.param||require("@jswork/next-param"),f={from:"zh",to:"en",delay:1e3};a.declare("nx.BaiduFanyi",{statics:{translate:function(n){var e=a.mix(null,f,s(n)),n="http://api.fanyi.baidu.com/api/trans/vip/translate?"+d(e),r=e.from,t=e.to,i=e.q;return r===t?new Promise(function(n){var e=i.split("\n");n({from:r,to:t,trans_result:a.map(e,function(n,e){return{src:e,dst:e}})})}):o(n).then(u(e.delay)).then(function(n){return n.json()})}}});"undefined"!=typeof module&&module.exports&&(module.exports=a.baiduFanyi)}();
!function(){var a=(this||window||Function("return this")()).nx||require("@jswork/next"),o=require("node-fetch"),u=require("@jswork/next-delay"),s=a.fangyiApiSign||require("@jswork/next-fanyi-api-sign"),d=a.param||require("@jswork/next-param"),f={from:"zh",to:"en",delay:1e3},n=a.declare("nx.BaiduFanyi",{statics:{translate:function(n){var e=a.mix(null,f,s(n)),n="http://api.fanyi.baidu.com/api/trans/vip/translate?"+d(e),r=e.from,t=e.to,i=e.q;return r===t?new Promise(function(n){var e=i.split("\n");n({from:r,to:t,trans_result:a.map(e,function(n,e){return{src:e,dst:e}})})}):o(n).then(u(e.delay)).then(function(n){return n.json()})}}});"undefined"!=typeof module&&module.exports&&(module.exports=n)}();
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@
});

if (typeof module !== 'undefined' && module.exports) {
module.exports = nx.baiduFanyi;
module.exports = NxBaiduFanyi;
}
})();

0 comments on commit fc48d32

Please sign in to comment.