Skip to content

Commit

Permalink
fill comment
Browse files Browse the repository at this point in the history
  • Loading branch information
fwh1990 committed Nov 15, 2017
1 parent 962147a commit 3e396fc
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions dist/Topic.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var Topic = function () {
/**
* Publish your topic with arguments
* Observer will notice all of the subscribers with arguments
* @param args
* @param {...} args
*/
value: function publish() {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
Expand Down Expand Up @@ -151,7 +151,7 @@ var Topic = function () {
/**
* reduce memory size by remove the unSubscribed items
* and publish action can be faster
* @param topicName
* @param {string} topicName
*/


Expand Down
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var topicHandles = {};

/**
*
* @param {string} topicName
* @param {string|number} topicName
* @returns {Topic}
*/
var topic = function topic(topicName) {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "subscribe and publish your business.",
"main": "dist/index.js",
"scripts": {
"lint": "exit 0",
"build": "babel src --out-dir dist && git add dist/*",
"test": "babel-node node_modules/.bin/babel-istanbul cover node_modules/mocha/bin/_mocha -- --require=babel-register -R spec tests/"
},
Expand All @@ -23,7 +24,7 @@
},
"homepage": "https://github.com/fwh1990/topic#readme",
"pre-commit": {
"run": ["build"]
"run": ["lint", "build"]
},
"dependencies": {
"babel-polyfill": "^6.26.0"
Expand Down
4 changes: 2 additions & 2 deletions src/Topic.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Topic {
/**
* reduce memory size by remove the unSubscribed items
* and publish action can be faster
* @param topicName
* @param {string} topicName
*/
static refresh = (topicName) => {
if (!refreshTimer.has(topicName)) {
Expand Down Expand Up @@ -69,7 +69,7 @@ class Topic {
/**
* Publish your topic with arguments
* Observer will notice all of the subscribers with arguments
* @param args
* @param {...} args
*/
publish(...args) {
const name = this.topicName;
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const topicHandles = {};

/**
*
* @param {string} topicName
* @param {string|number} topicName
* @returns {Topic}
*/
const topic = (topicName) => {
Expand Down

0 comments on commit 3e396fc

Please sign in to comment.