Skip to content

Commit

Permalink
Remove _symTransformer until official spec is worked out.
Browse files Browse the repository at this point in the history
Prompted by cognitect-labs/transducers-js#20 from @tgriesser, removing
the internal transformer symbol until issues are worked out. This symbol
is currently only supported in jlongster/transducers.js and
interoperability is questionable as (Symbol('transformer') !==
Symbol('transformer')).

This feature was not documented, nor do the tests depend on it, and
only effects an undocumented feature of into. Better to remove it now
until details are worked out.  If an "official spec" is agreed upon,
I will open a new PR.
  • Loading branch information
kevinbeaty committed Mar 12, 2015
1 parent 710e115 commit e4ce734
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
6 changes: 1 addition & 5 deletions src/internal/_isTransformer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
var _symTransformer = require('./_symTransformer');


module.exports = function _isTransformer(obj) {
return (obj[_symTransformer] != null) ||
(typeof obj.step === 'function' && typeof obj.result === 'function');
return (typeof obj.step === 'function' && typeof obj.result === 'function');
};
3 changes: 1 addition & 2 deletions src/internal/_stepCat.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
var _add = require('./_add');
var _appendTo = require('./_appendTo');
var _isTransformer = require('./_isTransformer');
var _symTransformer = require('./_symTransformer');
var isArrayLike = require('../isArrayLike');
var merge = require('../merge');

Expand Down Expand Up @@ -38,7 +37,7 @@ module.exports = (function() {

return function _stepCat(obj) {
if (_isTransformer(obj)) {
return obj[_symTransformer] || obj;
return obj;
}
if (isArrayLike(obj)) {
return _stepCatArray;
Expand Down
1 change: 0 additions & 1 deletion src/internal/_symTransformer.js

This file was deleted.

0 comments on commit e4ce734

Please sign in to comment.