Skip to content

Commit 140dcd6

Browse files
committed
Simplify the name for #3 from .into to .to
1 parent 91f88b6 commit 140dcd6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
* @param {Object|Function} target to convert into emitter
4646
* @return {Object|Function} target converted into emitter
4747
*/
48-
energy['into'] = function(target) {
48+
energy['to'] = function(target) {
4949
return defaults(target, this.call());
5050
};
5151

@@ -54,7 +54,7 @@
5454
* @param {Object|Energy|Function} target to convert into emitter
5555
* @return {Object|Energy|Function} source for chaining
5656
*/
57-
emitter['into'] = function(target) {
57+
emitter['to'] = function(target) {
5858
defaults(target, this);
5959
return this;
6060
};

test/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
aok('instance', emitter instanceof energy);
1414
aok('listeners', typeof emitter.listeners(key).length == 'number');
1515

16-
aok('into', function() {
16+
aok('to', function() {
1717
function wannabe() {
1818
wannabe.emit('called');
1919
}
2020

21-
var bool = wannabe === energy.into(wannabe) && typeof wannabe.emit == 'function';
21+
var bool = wannabe === energy.to(wannabe) && typeof wannabe.emit == 'function';
2222
bool && wannabe.once('called', function() {
2323
bool = this === wannabe;
2424
}) && wannabe();

0 commit comments

Comments
 (0)