react-notifier-system
Advanced tools
@@ -50,2 +50,20 @@ 'use strict'; | ||
| // eslint-disable-next-line | ||
| _reactNotificationSystem2.default.prototype.removeNotificationById = function (id) { | ||
| this.uid += 1; | ||
| var notificationIndex = this.state.notifications.findIndex(function (val) { | ||
| return val.id === id; | ||
| }); | ||
| if (notificationIndex >= 0) { | ||
| this.state.notifications.splice(notificationIndex, 1); | ||
| this.setState({ | ||
| notifications: this.state.notifications | ||
| }); | ||
| return true; | ||
| } | ||
| return false; | ||
| }; | ||
| exports.default = _reactNotificationSystem2.default; |
+20
-16
| { | ||
| "name": "react-notifier-system", | ||
| "version": "0.0.2", | ||
| "version": "0.0.3", | ||
| "repository": "sheikhG1900/react-notifier-system", | ||
@@ -22,3 +22,5 @@ "author": "Sheikh Abdul Wahid Ahmed @sheikhG1900", | ||
| "lint": "eslint src webpack.config.babel.js --ext .js,.jsx", | ||
| "test": "yarn lint && flow && jest --coverage", | ||
| "test-jest": "jest --coverage", | ||
| "test-flow": "flow", | ||
| "test": "yarn lint && yarn test-flow && yarn test-jest", | ||
| "precommit": "yarn test", | ||
@@ -28,4 +30,4 @@ "prepush": "yarn test && yarn prod:build" | ||
| "dependencies": { | ||
| "react": "^16.2.0", | ||
| "react-dom": "^16.2.0", | ||
| "react": "^16.3.1", | ||
| "react-dom": "^16.3.1", | ||
| "react-notification-system": "^0.2.17" | ||
@@ -37,5 +39,5 @@ }, | ||
| "babel-eslint": "^8.2.1", | ||
| "babel-jest": "^21.2.0", | ||
| "babel-jest": "^22.4.3", | ||
| "babel-loader": "^7.1.2", | ||
| "babel-plugin-flow-react-proptypes": "^9.2.0", | ||
| "babel-plugin-flow-react-proptypes": "^22.0.0", | ||
| "babel-plugin-module-resolver": "^3.0.0", | ||
@@ -49,24 +51,26 @@ "babel-preset-env": "^1.6.0", | ||
| "cross-env": "^5.1.3", | ||
| "enhanced-resolve": "^3.4.1", | ||
| "enhanced-resolve": "^4.0.0", | ||
| "eslint": "^4.16.0", | ||
| "eslint-config-airbnb": "^16.0.0", | ||
| "eslint-import-resolver-babel-module": "^4.0.0", | ||
| "eslint-import-resolver-webpack": "^0.8.4", | ||
| "eslint-import-resolver-webpack": "^0.9.0", | ||
| "eslint-plugin-compat": "^2.2.0", | ||
| "eslint-plugin-flowtype": "^2.42.0", | ||
| "eslint-plugin-flowtype-errors": "^3.3.7", | ||
| "eslint-plugin-import": "^2.8.0", | ||
| "eslint-plugin-import": "^2.10.0", | ||
| "eslint-plugin-jsx-a11y": "^6.0.3", | ||
| "eslint-plugin-react": "^7.6.1", | ||
| "fetch-mock": "^5.13.1", | ||
| "flow-bin": "^0.59.0", | ||
| "fetch-mock": "^6.3.0", | ||
| "flow-bin": "^0.69.0", | ||
| "husky": "^0.14.3", | ||
| "jest": "^21.2.1", | ||
| "nodemon": "^1.14.12", | ||
| "pm2": "^2.9.3", | ||
| "jest": "^22.4.3", | ||
| "nodemon": "^1.17.3", | ||
| "pm2": "^2.10.2", | ||
| "react-test-renderer": "^16.3.1", | ||
| "rimraf": "^2.6.2", | ||
| "webpack": "^3.10.0", | ||
| "webpack-dev-server": "^2.11.1", | ||
| "webpack": "^4.4.1", | ||
| "webpack-cli": "^2.0.13", | ||
| "webpack-dev-server": "^3.1.1", | ||
| "yarn": "^1.4.0" | ||
| } | ||
| } |
5103
12.95%66
29.41%37
5.71%Updated
Updated