Socket
Socket
Sign inDemoInstall

fxjs2

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fxjs2 - npm Package Compare versions

Comparing version 0.2.4 to 0.2.5

5

dropRight.js
import curry from "./curry.js";
import takeAll from "./takeAll.js";
import dropLazy from "./Lazy/dropLazy.js";
import go1 from "./go1.js";
import take from "./take.js";
export default curry(function drop(l, iter) {
return takeAll(dropLazy(l, iter));
return go1(takeAll(iter), arr => take(arr.length - l, arr));
});

2

fx.js

@@ -85,3 +85,5 @@ export { default as minBy, default as min_by } from './minBy.js';

export { default as range } from './range.js';
export { default as drop } from './drop.js';
export { default as dropRight, default as drop_right } from './dropRight.js';
export * from './L.js';
export * from './C.js';

@@ -6,2 +6,3 @@ import curry from "../curry.js";

export default curry(function *dropLazy(l, iter) {
if (l < 1) return yield *safety(iter);
for (const a of safety(iter)) {

@@ -8,0 +9,0 @@ if (a instanceof Promise) yield a.then(a => l ? (l--, Promise.reject(nop)) : a);

@@ -5,2 +5,3 @@ import curry from "../curry.js";

export default curry(function *takeLazy(l, iter) {
if (l < 1) return;
for (const a of safety(iter)) {

@@ -7,0 +8,0 @@ if (a instanceof Promise) yield a.then(a => (--l, a));

{
"name": "fxjs2",
"version": "0.2.4",
"version": "0.2.5",
"description": "Functional Extensions for Javascript",

@@ -5,0 +5,0 @@ "main": "index.js",

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

[EN](https://github.com/marpple/FxJS) | [KR](https://github.com/marpple/FxJS/blob/master/README_kr.md)
## FxJS - Functional Extensions for Javascript
[EN](https://github.com/marpple/FxJS) | [KR](https://github.com/marpple/FxJS/blob/master/README_kr.md)
FxJS is a functional programming library that uses basic JavaScript values ​​and emphasizes repeatable programming and Promise.

@@ -6,0 +6,0 @@

@@ -6,3 +6,3 @@ import curry from "./curry.js";

export default curry(function take(l, iter) {
if (l === 0) return [];
if (l < 1) return [];
let res = [];

@@ -9,0 +9,0 @@ iter = toIter(iter);

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