-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #194 from goatslacker/add-actions-to-alt
Add all actions to this.actions
- Loading branch information
Showing
12 changed files
with
207 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* istanbul ignore next */ | ||
function NoopClass() { } | ||
|
||
const builtIns = Object.getOwnPropertyNames(NoopClass) | ||
const builtInProto = Object.getOwnPropertyNames(NoopClass.prototype) | ||
|
||
export function getInternalMethods(obj, isProto) { | ||
const excluded = isProto ? builtInProto : builtIns | ||
return Object.getOwnPropertyNames(obj).reduce((value, m) => { | ||
if (excluded.indexOf(m) !== -1) { | ||
return value | ||
} | ||
|
||
value[m] = obj[m] | ||
return value | ||
}, {}) | ||
} | ||
|
||
export function warn(msg) { | ||
/* istanbul ignore else */ | ||
if (typeof console !== 'undefined') { | ||
console.warn(new ReferenceError(msg)) | ||
} | ||
} | ||
|
||
export function uid(container, name) { | ||
let count = 0 | ||
let key = name | ||
while (Object.hasOwnProperty.call(container, key)) { | ||
key = name + String(++count) | ||
} | ||
return key | ||
} | ||
|
||
export function formatAsConstant(name) { | ||
return name.replace(/[a-z]([A-Z])/g, (i) => { | ||
return `${i[0]}_${i[1].toLowerCase()}` | ||
}).toUpperCase() | ||
} | ||
|
||
export function dispatchIdentity(x, ...a) { | ||
this.dispatch(a.length ? [x].concat(a) : x) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.