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

monocle-ts

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

monocle-ts - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

5

CHANGELOG.md

@@ -16,2 +16,7 @@ # Changelog

# 1.4.0
- **New Feature**
- add `Prism.fromRefinement` (@bepremeg)
# 1.3.0

@@ -18,0 +23,0 @@

3

lib/index.d.ts

@@ -7,3 +7,3 @@ import { HKT, URIS, URIS2, URIS3, Type, Type2, Type3 } from 'fp-ts/lib/HKT';

import { Option } from 'fp-ts/lib/Option';
import { Predicate } from 'fp-ts/lib/function';
import { Predicate, Refinement } from 'fp-ts/lib/function';
export declare class Iso<S, A> {

@@ -115,2 +115,3 @@ readonly get: (s: S) => A;

static fromPredicate<A>(predicate: Predicate<A>): Prism<A, A>;
static fromRefinement<S, A extends S>(refinement: Refinement<S, A>): Prism<S, A>;
static some<A>(): Prism<Option<A>, A>;

@@ -117,0 +118,0 @@ modify(f: (a: A) => A): (s: S) => S;

@@ -246,4 +246,7 @@ "use strict";

Prism.fromPredicate = function (predicate) {
return new Prism(function (s) { return (predicate(s) ? Option_1.some(s) : Option_1.none); }, function (a) { return a; });
return new Prism(function (s) { return (predicate(s) ? Option_1.some(s) : Option_1.none); }, function_1.identity);
};
Prism.fromRefinement = function (refinement) {
return new Prism(function (s) { return (refinement(s) ? Option_1.some(s) : Option_1.none); }, function_1.identity);
};
Prism.some = function () {

@@ -250,0 +253,0 @@ return somePrism;

{
"name": "monocle-ts",
"version": "1.3.0",
"version": "1.4.0",
"description": "A porting of scala monocle library to TypeScript",

@@ -5,0 +5,0 @@ "files": [

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