Socket
Socket
Sign inDemoInstall

monocle-ts

Package Overview
Dependencies
1
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.5.0 to 0.5.1-dev.20171122

lib/index.js.flow

6

CHANGELOG.md

@@ -15,2 +15,8 @@ # Changelog

# 0.5.1
- **New Feature**
- add Flow definition file (@gcanti)
- export `Option`, `none` and `some` (@gcanti)
# 0.5.0

@@ -17,0 +23,0 @@

20

lib/index.d.ts

@@ -264,13 +264,9 @@ import { HKT, HKTS, HKTAs, HKT2S, HKT2As } from 'fp-ts/lib/HKT';

}
export declare class Ops {
/** create a Traversal from a Traversable */
fromTraversable<T extends HKT2S>(T: Traversable<T>): <L, A>() => Traversal<HKT2As<T, L, A>, A>;
fromTraversable<T extends HKTS>(T: Traversable<T>): <A>() => Traversal<HKTAs<T, A>, A>;
fromTraversable<T>(T: Traversable<T>): <A>() => Traversal<HKT<T, A>, A>;
/** create a Fold from a Foldable */
fromFoldable<F extends HKT2S>(F: Foldable<F>): <L, A>() => Fold<HKT2As<F, L, A>, A>;
fromFoldable<F extends HKTS>(F: Foldable<F>): <A>() => Fold<HKTAs<F, A>, A>;
fromFoldable<F>(F: Foldable<F>): <A>() => Fold<HKT<F, A>, A>;
}
export declare const fromTraversable: Ops['fromTraversable'];
export declare const fromFoldable: Ops['fromFoldable'];
/** create a Traversal from a Traversable */
export declare function fromTraversable<T extends HKT2S>(T: Traversable<T>): <L, A>() => Traversal<HKT2As<T, L, A>, A>;
export declare function fromTraversable<T extends HKTS>(T: Traversable<T>): <A>() => Traversal<HKTAs<T, A>, A>;
export declare function fromTraversable<T>(T: Traversable<T>): <A>() => Traversal<HKT<T, A>, A>;
/** create a Fold from a Foldable */
export declare function fromFoldable<F extends HKT2S>(F: Foldable<F>): <L, A>() => Fold<HKT2As<F, L, A>, A>;
export declare function fromFoldable<F extends HKTS>(F: Foldable<F>): <A>() => Fold<HKTAs<F, A>, A>;
export declare function fromFoldable<F>(F: Foldable<F>): <A>() => Fold<HKT<F, A>, A>;

27

lib/index.js

@@ -209,3 +209,3 @@ "use strict";

Laws:
1. getOption(s).fold(identity, reverseGet) = s
1. getOption(s).fold(() => s, reverseGet) = s
2. getOption(reverseGet(a)) = Some(a)

@@ -568,19 +568,12 @@ */

exports.Setter = Setter;
var Ops = /** @class */ (function () {
function Ops() {
}
Ops.prototype.fromTraversable = function (T) {
return function () {
return new Traversal(function (F) { return function (f) { return function (s) { return T.traverse(F)(f, s); }; }; });
};
function fromTraversable(T) {
return function () {
return new Traversal(function (F) { return function (f) { return function (s) { return T.traverse(F)(f, s); }; }; });
};
Ops.prototype.fromFoldable = function (F) {
return function () { return new Fold(function (M) { return function (f) { return function (s) { return Foldable_1.foldMap(F, M)(f)(s); }; }; }); };
};
return Ops;
}());
exports.Ops = Ops;
var ops = new Ops();
exports.fromTraversable = ops.fromTraversable;
exports.fromFoldable = ops.fromFoldable;
}
exports.fromTraversable = fromTraversable;
function fromFoldable(F) {
return function () { return new Fold(function (M) { return function (f) { return function (s) { return Foldable_1.foldMap(F, M)(f)(s); }; }; }); };
}
exports.fromFoldable = fromFoldable;
//# sourceMappingURL=index.js.map
{
"name": "monocle-ts",
"version": "0.5.0",
"version": "0.5.1-dev.20171122",
"description": "A porting of scala monocle library to TypeScript",

@@ -17,5 +17,9 @@ "files": ["lib"],

"prettier --no-semi --single-quote --print-width 120 --parser typescript --write \"{src,test,examples}/**/*.ts\"",
"flow-copy-definition-files": "cp src/*.js.flow lib",
"flow-test": "flow status",
"flow-fix-prettier":
"prettier --no-semi --single-quote --print-width 120 --parser flow --write \"{src,test,examples,exercises}/**/*.js.flow\"",
"test": "npm run prettier && npm run lint && npm run typings-checker && npm run mocha",
"clean": "rm -rf lib/*",
"build": "npm run clean && tsc",
"build": "npm run clean && tsc && npm run flow-copy-definition-files",
"doctoc": "doctoc README.md"

@@ -34,3 +38,3 @@ },

"dependencies": {
"fp-ts": "^0.6.0"
"fp-ts": "0.6.4-dev.20171122"
},

@@ -42,7 +46,7 @@ "devDependencies": {

"mocha": "3.2.0",
"prettier": "1.7.0",
"prettier": "1.8.2",
"ts-node": "3.1.0",
"tslint": "4.4.2",
"tslint-config-standard": "4.0.0",
"typescript": "2.6.0-rc",
"typescript": "2.6.1",
"typings-checker": "1.1.2"

@@ -49,0 +53,0 @@ },

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc