Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeroen van der Heijden committed Apr 6, 2020
1 parent dd2f092 commit c05089a
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var Actions = /*#__PURE__*/function () {
(0, _classCallCheck2["default"])(this, Actions);
this._callbacks = names.reduce(function (o, action) {
typeof action !== 'string' || !action.length || action.charAt(0) === '_' ? process.env.NODE_ENV !== 'production' ? (0, _invariant["default"])(false, 'Cannot use action `%s`. Each action must be a sting with at least one character and cannot start with an underscore.', action) : (0, _invariant["default"])(false) : undefined;
_this.hasOwnProperty(action) ? process.env.NODE_ENV !== 'production' ? (0, _invariant["default"])(false, 'Action `%s` is already set (duplicate actions are not allowed).', action) : (0, _invariant["default"])(false) : undefined;
Object.prototype.hasOwnProperty.call(_this, action) ? process.env.NODE_ENV !== 'production' ? (0, _invariant["default"])(false, 'Action `%s` is already set (duplicate actions are not allowed).', action) : (0, _invariant["default"])(false) : undefined;
var onKey = "on".concat(action.charAt(0).toUpperCase()).concat(action.substr(1));

_this[action] = function () {
Expand Down
2 changes: 1 addition & 1 deletion lib/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ var Store = /*#__PURE__*/function () {
key: "_vlowFilterState",
value: function _vlowFilterState(state, keys) {
return keys.reduce(function (o, k) {
if (state.hasOwnProperty(k)) {
if (Object.prototype.hasOwnProperty.call(state, k)) {
o[k] = state[k];
}

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vlow",
"version": "1.1.8",
"version": "1.1.9",
"description": "A simple library for unidirectional dataflow architecture inspired by Reflux",
"main": "lib/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Actions {
constructor(names) {
this._callbacks = names.reduce((o, action) => {
typeof action !== 'string' || !action.length || action.charAt(0) === '_' ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot use action `%s`. Each action must be a sting with at least one character and cannot start with an underscore.', action) : invariant(false) : undefined;
this.hasOwnProperty(action) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Action `%s` is already set (duplicate actions are not allowed).', action) : invariant(false) : undefined;
Object.prototype.hasOwnProperty.call(this, action) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Action `%s` is already set (duplicate actions are not allowed).', action) : invariant(false) : undefined;
const onKey = `on${action.charAt(0).toUpperCase()}${action.substr(1)}`;
this[action] = (...args) => this._on(onKey, args);
o[onKey] = [];
Expand Down
2 changes: 1 addition & 1 deletion src/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Store {

_vlowFilterState(state, keys) {
return keys.reduce((o, k)=> {
if (state.hasOwnProperty(k)) {
if (Object.prototype.hasOwnProperty.call(state, k)) {
o[k] = state[k];
}
return o;
Expand Down

0 comments on commit c05089a

Please sign in to comment.