You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

transduce

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

transduce

transducers-js or transducers.js: Users choice

Source
npmnpm
Version
0.0.12
Version published
Weekly downloads
35
-41.67%
Maintainers
1
Weekly downloads
 
Created
Source

Transduce

Build Status

Let your transducers library support either transducers-js or transducers.js and leave the choice to the end user. The end user can npm install, or install a browser version in a <script> tag their preference before using this library and the installed library will be automatically detected. When API differs, exported functions are adapted to match transducers-js.

For general use, you can use any other transduce- libraries as desired directly with your preferred transducers implementation. All of these libraries can work with either implementation and can be required and used directly (and do not depend on transduce):

The transduce library may only be useful for library extensions that support both implementations. See underscore-transducer for an example, or the tests of the above libraries. The goal is to adapt to a common interface so the end user can choose the transducer implementation.

Currently supports a common interface for the following methods:

into: function(empty, xf, coll);
transduce: function(xf, f, init, coll);
reduce: function(f, init, coll);
map: function(f);
filter: function(pred);
remove: function(pred);
take: function(n);
takeWhile: function(pred);
drop: function(n);
dropWhile: function(pred);
cat: transducer;
mapcat: function(f);
partitionAll: function(n);
partitionBy: function(f);

Also mixes in all methods in transduce-protocol.

Keywords

transducer

FAQs

Package last updated on 16 Nov 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts