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

localvalue-ts

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

localvalue-ts - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

2

LocalValue.d.ts

@@ -46,2 +46,3 @@ import { Kind2, URIS2 } from "fp-ts/HKT";

readonly getOrElse: <E, A>(f: Lazy<A>) => (fa: Kind2<F, E, A>) => A;
readonly getOrElseW: <E, A, B>(f: Lazy<B>) => (fa: Kind2<F, E, A>) => A | B;
}

@@ -51,2 +52,3 @@ export declare const fold: <E, A, B>(onNone: () => B, onError: (e: E) => B, onValue: (a: A) => B) => (fa: LocalValue<E, A>) => B;

export declare const getOrElse: <E, A>(defaultValue: Lazy<A>) => (lv: LocalValue<E, A>) => A;
export declare const getOrElseW: <E, A, B>(defaultValue: Lazy<B>) => (lv: LocalValue<E, A>) => A | B;
export declare const of: <A, E = never>(v: A) => LocalValue<E, A>;

@@ -53,0 +55,0 @@ export declare const chain: <E, A, B>(f: (a: A) => LocalValue<E, B>) => (lv: LocalValue<E, A>) => LocalValue<E, B>;

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.localValue = exports.invalid = exports.valid = exports.absent = exports.isInvalid = exports.isValid = exports.isAbsent = exports.alt = exports.toEither = exports.toOption = exports.fromEither = exports.fromOption = exports.map = exports.chain = exports.of = exports.getOrElse = exports.fold2 = exports.fold = exports.URI = void 0;
exports.localValue = exports.invalid = exports.valid = exports.absent = exports.isInvalid = exports.isValid = exports.isAbsent = exports.alt = exports.toEither = exports.toOption = exports.fromEither = exports.fromOption = exports.map = exports.chain = exports.of = exports.getOrElseW = exports.getOrElse = exports.fold2 = exports.fold = exports.URI = void 0;
var O = __importStar(require("fp-ts/Option"));

@@ -92,2 +92,9 @@ var E = __importStar(require("fp-ts/Either"));

exports.getOrElse = getOrElse;
var getOrElseW = function (defaultValue) { return function (lv) {
if (exports.isAbsent(lv) || exports.isInvalid(lv)) {
return defaultValue();
}
return lv.value;
}; };
exports.getOrElseW = getOrElseW;
var of = function (v) { return exports.valid(v); };

@@ -151,2 +158,3 @@ exports.of = of;

getOrElse: exports.getOrElse,
getOrElseW: exports.getOrElseW,
of: exports.of,

@@ -153,0 +161,0 @@ ap: _ap,

2

package.json
{
"name": "localvalue-ts",
"version": "2.0.0",
"version": "2.1.0",
"description": "A small library to wrap browser's localstorage in a functional fashion.",

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

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