Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fromfrom

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fromfrom - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

dist/lib/transforms/prepend.js

40

dist/fromfrom.es5.js

@@ -13,8 +13,10 @@ /**

const createConcatIterable = (source, other) => new IterableCreatorIterable(function* concat() {
const createConcatIterable = (source, ...others) => new IterableCreatorIterable(function* concat() {
for (const item of source) {
yield item;
}
for (const item of other) {
yield item;
for (const other of others) {
for (const item of other) {
yield item;
}
}

@@ -167,2 +169,13 @@ });

const createPrependIterable = (source, ...others) => new IterableCreatorIterable(function* prepend() {
for (const other of others) {
for (const item of other) {
yield item;
}
}
for (const item of source) {
yield item;
}
});
const identityPredicateFn = (x) => x;

@@ -203,4 +216,4 @@ const defaultComparer = (a, b) => {

*/
concat(other) {
return new Sequence(createConcatIterable(this._iterable, other));
concat(...others) {
return new Sequence(createConcatIterable(this._iterable, ...others));
}

@@ -485,2 +498,19 @@ /**

/**
* This method yields the elements from the provided items first, followed by the items in the
* underlying sequence.
*
* @param items The provided set of items that should be in the prepended to the Sequence.
*
* @example
* ```ts
* // returns [4, 5, 6, 1, 2, 3]
* from([1, 2, 3])
* .prepend([4, 5, 6])
* .toArray();
* ```
*/
prepend(...items) {
return new Sequence(createPrependIterable(this._iterable, ...items));
}
/**
* Converts the sequence to an array

@@ -487,0 +517,0 @@ *

@@ -19,8 +19,10 @@ (function (global, factory) {

const createConcatIterable = (source, other) => new IterableCreatorIterable(function* concat() {
const createConcatIterable = (source, ...others) => new IterableCreatorIterable(function* concat() {
for (const item of source) {
yield item;
}
for (const item of other) {
yield item;
for (const other of others) {
for (const item of other) {
yield item;
}
}

@@ -173,2 +175,13 @@ });

const createPrependIterable = (source, ...others) => new IterableCreatorIterable(function* prepend() {
for (const other of others) {
for (const item of other) {
yield item;
}
}
for (const item of source) {
yield item;
}
});
const identityPredicateFn = (x) => x;

@@ -209,4 +222,4 @@ const defaultComparer = (a, b) => {

*/
concat(other) {
return new Sequence(createConcatIterable(this._iterable, other));
concat(...others) {
return new Sequence(createConcatIterable(this._iterable, ...others));
}

@@ -491,2 +504,19 @@ /**

/**
* This method yields the elements from the provided items first, followed by the items in the
* underlying sequence.
*
* @param items The provided set of items that should be in the prepended to the Sequence.
*
* @example
* ```ts
* // returns [4, 5, 6, 1, 2, 3]
* from([1, 2, 3])
* .prepend([4, 5, 6])
* .toArray();
* ```
*/
prepend(...items) {
return new Sequence(createPrependIterable(this._iterable, ...items));
}
/**
* Converts the sequence to an array

@@ -493,0 +523,0 @@ *

@@ -16,2 +16,3 @@ "use strict";

const without_1 = require("./transforms/without");
const prepend_1 = require("./transforms/prepend");
const identityPredicateFn = (x) => x;

@@ -52,4 +53,4 @@ const defaultComparer = (a, b) => {

*/
concat(other) {
return new Sequence(concat_1.createConcatIterable(this._iterable, other));
concat(...others) {
return new Sequence(concat_1.createConcatIterable(this._iterable, ...others));
}

@@ -334,2 +335,19 @@ /**

/**
* This method yields the elements from the provided items first, followed by the items in the
* underlying sequence.
*
* @param items The provided set of items that should be in the prepended to the Sequence.
*
* @example
* ```ts
* // returns [4, 5, 6, 1, 2, 3]
* from([1, 2, 3])
* .prepend([4, 5, 6])
* .toArray();
* ```
*/
prepend(...items) {
return new Sequence(prepend_1.createPrependIterable(this._iterable, ...items));
}
/**
* Converts the sequence to an array

@@ -336,0 +354,0 @@ *

8

dist/lib/transforms/concat.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const IterableCreatorIterable_1 = require("../IterableCreatorIterable");
exports.createConcatIterable = (source, other) => new IterableCreatorIterable_1.IterableCreatorIterable(function* concat() {
exports.createConcatIterable = (source, ...others) => new IterableCreatorIterable_1.IterableCreatorIterable(function* concat() {
for (const item of source) {
yield item;
}
for (const item of other) {
yield item;
for (const other of others) {
for (const item of other) {
yield item;
}
}
});
//# sourceMappingURL=concat.js.map

@@ -19,3 +19,3 @@ import { KeySelectorFn, ComparerFn, PredicateFn, MapFn, CallbackFn, Grouping, ReduceCallbackFn, NumberKeyedObject, StringKeyedObject, ComparePredicate } from "./types";

*/
concat<TOther>(other: Iterable<TOther>): Sequence<TItem | TOther>;
concat<TOther>(...others: Iterable<TOther>[]): Sequence<TItem | TOther>;
/**

@@ -338,2 +338,17 @@ * Returns unique values in the sequence. Uniqueness is checked using

/**
* This method yields the elements from the provided items first, followed by the items in the
* underlying sequence.
*
* @param items The provided set of items that should be in the prepended to the Sequence.
*
* @example
* ```ts
* // returns [4, 5, 6, 1, 2, 3]
* from([1, 2, 3])
* .prepend([4, 5, 6])
* .toArray();
* ```
*/
prepend(...items: Iterable<TItem>[]): Sequence<TItem>;
/**
* Converts the sequence to an array

@@ -340,0 +355,0 @@ *

@@ -1,1 +0,1 @@

export declare const createConcatIterable: <TItem, TOther>(source: Iterable<TItem>, other: Iterable<TOther>) => Iterable<TItem | TOther>;
export declare const createConcatIterable: <TItem, TOther>(source: Iterable<TItem>, ...others: Iterable<TOther>[]) => Iterable<TItem | TOther>;
{
"name": "fromfrom",
"version": "1.2.0",
"version": "1.3.0",
"description": "LINQ inspired library to transform sequences of data",

@@ -22,2 +22,3 @@ "keywords": [

},
"homepage": "https://tomi.github.io/fromfrom/",
"license": "MIT",

@@ -103,2 +104,3 @@ "engines": {

"@types/node": "^10.11.0",
"all-contributors-cli": "^6.6.1",
"colors": "^1.3.3",

@@ -135,3 +137,3 @@ "commitizen": "^3.0.7",

"travis-deploy-once": "^5.0.9",
"ts-jest": "^24.0.0",
"ts-jest": "^24.0.2",
"ts-loader": "^5.3.3",

@@ -138,0 +140,0 @@ "ts-node": "^8.0.3",

@@ -8,2 +8,3 @@ # fromfrom

[![Sponsored](https://img.shields.io/badge/chilicorn-sponsored-brightgreen.svg?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAA4AAAAPCAM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org/oss-sponsorship)
[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors)

@@ -82,1 +83,13 @@ fromfrom is a [LINQ](https://en.wikipedia.org/wiki/Language_Integrated_Query) inspired library to transform sequences of data.

Forked from [TypeScript library starter](https://github.com/alexjoverm/typescript-library-starter)
## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore -->
<table><tr><td align="center"><a href="https://github.com/tomi"><img src="https://avatars2.githubusercontent.com/u/10324676?v=4" width="100px;" alt="Tomi Turtiainen"/><br /><sub><b>Tomi Turtiainen</b></sub></a><br /><a href="https://github.com/tomi/fromfrom/commits?author=tomi" title="Code">💻</a> <a href="https://github.com/tomi/fromfrom/commits?author=tomi" title="Documentation">📖</a> <a href="#infra-tomi" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/tomi/fromfrom/commits?author=tomi" title="Tests">⚠️</a></td><td align="center"><a href="https://github.com/jtenner"><img src="https://avatars1.githubusercontent.com/u/3761339?v=4" width="100px;" alt="jtenner"/><br /><sub><b>jtenner</b></sub></a><br /><a href="https://github.com/tomi/fromfrom/commits?author=jtenner" title="Code">💻</a> <a href="https://github.com/tomi/fromfrom/commits?author=jtenner" title="Tests">⚠️</a> <a href="https://github.com/tomi/fromfrom/commits?author=jtenner" title="Documentation">📖</a></td><td align="center"><a href="https://vaaralav.com"><img src="https://avatars0.githubusercontent.com/u/8571541?v=4" width="100px;" alt="Ville Vaarala"/><br /><sub><b>Ville Vaarala</b></sub></a><br /><a href="#maintenance-vaaralav" title="Maintenance">🚧</a></td></tr></table>
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc