
Product
Introducing Supply Chain Attack Campaigns Tracking in the Socket Dashboard
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.
iterator-sync
Advanced tools
Iterator over a stack of functions.
This module is intended to be used with loader-cachebut may be used by itself or in other modules.
Install with npm
$ npm i iterator-sync --save
var iterator = require('iterator-sync');
Iterate over a stack of functions passing the results of each function to the next function in the stack.
Params
stack {Array}: Array of functions to call.returns {Function}: Returns a function that will iterator over the given stack of functions.var fs = require('fs');
var iterator = require('iterator-sync');
var stack = [
function (fp) { return fs.readFileSync(fp, 'utf8'); },
function (contents) { return JSON.parse(contents); }
];
var readJSON = iterator(stack);
var pkg = readJSON('./package.json');
console.log(pkg);
<%- related(['iterator-async', 'iterator-promise', 'iterator-streams', 'loader-cache']) %>
Install dev dependencies:
$ npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Brian Woodward
Copyright © 2015 Brian Woodward Released under the MIT license.
This file was generated by verb-cli on June 12, 2015.
FAQs
Iterate over a stack of functions.
The npm package iterator-sync receives a total of 1 weekly downloads. As such, iterator-sync popularity was classified as not popular.
We found that iterator-sync demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

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.

Product
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.

Research
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.

Security News
Node.js 25.4.0 makes require(esm) stable, formalizing CommonJS and ESM compatibility across supported Node versions.