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

functools-ts

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

functools-ts - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

_config.yml

1

dist/list.d.ts

@@ -18,3 +18,4 @@ import { F1 } from "./function";

equals: <A>(list1: ReadonlyArray<A>, list2: ReadonlyArray<A>, eq?: ((a: A, b: A) => boolean) | undefined) => boolean;
place: <A>(a: A, where: Selector<A>, newIdx: number) => (list: ReadonlyArray<A>) => ReadonlyArray<A>;
};
export {};

@@ -61,4 +61,9 @@ "use strict";

}
}
},
place: function (a, where, newIdx) { return function (list) {
var list_ = list.filter(function (item, idx) { return !match(where, item, idx, list); });
list_.splice(newIdx, 0, a);
return list_;
}; }
};
//# sourceMappingURL=list.js.map

2

package.json

@@ -10,3 +10,3 @@ {

"typings": "dist/index.d.ts",
"version": "0.1.0",
"version": "0.1.1",
"repository": "git@bitbucket.org:chaaba_j/ts-functools.git",

@@ -13,0 +13,0 @@ "author": "Jalal Chaabane",

@@ -80,3 +80,10 @@ import { F1 } from "./function"

}
},
place: <A>(a: A, where: Selector<A>, newIdx: number) => (list: List<A>): List<A> => {
const list_ = list.filter(
(item, idx) => !match(where, item, idx, list)
)
list_.splice(newIdx, 0, a)
return list_
}
}

@@ -12,3 +12,3 @@ import { List } from "../src/list";

name: "test3",
description: "test2"
description: "test3"
},

@@ -44,2 +44,12 @@ {

})
it("should move item from index 2 to index 1", () => {
const moved = List.place(items[1], 1, 2)(items)
expect(moved[2]).to.eql(items[1])
})
it("should move the first element to the end", () => {
const moved = List.place(items[0], 0, 2)(items)
expect(moved[2]).to.eql(items[0])
})
})

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