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

react-localstorage-ts

Package Overview
Dependencies
Maintainers
2
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-localstorage-ts - npm Package Compare versions

Comparing version 2.0.0-beta.7 to 2.0.0-beta.8

2

index.d.ts

@@ -1,2 +0,2 @@

export { getLocalValue, setLocalValue, removeLocalValue } from "localvalue-ts";
export { getLocalValue, setLocalValue, removeLocalValue, createLocalStorage, } from "localvalue-ts";
export * from "./useLocalStorage";

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.removeLocalValue = exports.setLocalValue = exports.getLocalValue = void 0;
exports.createLocalStorage = exports.removeLocalValue = exports.setLocalValue = exports.getLocalValue = void 0;
var localvalue_ts_1 = require("localvalue-ts");

@@ -19,2 +19,3 @@ Object.defineProperty(exports, "getLocalValue", { enumerable: true, get: function () { return localvalue_ts_1.getLocalValue; } });

Object.defineProperty(exports, "removeLocalValue", { enumerable: true, get: function () { return localvalue_ts_1.removeLocalValue; } });
Object.defineProperty(exports, "createLocalStorage", { enumerable: true, get: function () { return localvalue_ts_1.createLocalStorage; } });
__exportStar(require("./useLocalStorage"), exports);

@@ -1,4 +0,1 @@

import * as t from "io-ts";
import { Json } from "io-ts-types";
import { Codec } from "./Codec";
export declare const fromIoTsCodec: <A, B extends Json>(C: t.Type<A, B, unknown>) => Codec<t.Errors, string, A>;
export * from "localvalue-ts/io-ts";

@@ -9,35 +9,6 @@ "use strict";

}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromIoTsCodec = void 0;
var function_1 = require("fp-ts/lib/function");
var t = __importStar(require("io-ts"));
var E = __importStar(require("fp-ts/Either"));
var io_ts_types_1 = require("io-ts-types");
var LV = __importStar(require("./LocalValue"));
var adaptIoTsCodec = function (C) {
return {
encode: C.encode,
decode: function (u) { return LV.fromEither(C.decode(u)); },
};
};
var fromIoTsCodec = function (C) {
var stringCodec = new t.Type(C.name, C.is, function (u, c) {
return function_1.pipe(t.string.validate(u, c), E.chain(function (jsonString) { return io_ts_types_1.JsonFromString.validate(jsonString, c); }), E.chain(function (json) { return C.validate(json, c); }));
}, function (v) {
return function_1.pipe(v, C.encode, io_ts_types_1.JsonFromString.encode);
});
return adaptIoTsCodec(stringCodec);
};
exports.fromIoTsCodec = fromIoTsCodec;
__exportStar(require("localvalue-ts/io-ts"), exports);
{
"name": "react-localstorage-ts",
"version": "2.0.0-beta.7",
"version": "2.0.0-beta.8",
"description": "A small library to wrap browser's localstorage in a functional fashion.",

@@ -29,3 +29,3 @@ "main": "index.js",

"io-ts": "^2.2.15",
"localvalue-ts": "^1.1.0-beta.2",
"localvalue-ts": "^1.1.0-beta.3",
"monocle-ts": "2.3.5",

@@ -32,0 +32,0 @@ "newtype-ts": "^0.3.4"

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