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

@trayio/commons

Package Overview
Dependencies
Maintainers
4
Versions
179
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trayio/commons - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

2

dist/dynamictype/DynamicType.d.ts

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

import * as TE from 'fp-ts/TaskEither';
import * as E from 'fp-ts/Either';

@@ -12,2 +13,3 @@ import * as t from 'io-ts';

writeToFile: (path: string, value: DynamicType) => E.Either<Error, undefined>;
writeToFileAsync: (path: string, value: DynamicType) => TE.TaskEither<Error, undefined>;
safeCast: <T>(dynamicType: DynamicType, codec: Codec<T>) => E.Either<Error, T>;

@@ -14,0 +16,0 @@ }

@@ -27,3 +27,5 @@ "use strict";

exports.dynamicArrayTypeDescriptor = exports.dynamicObjectTypeDescriptor = exports.dynamicTypeDescriptor = exports.DynamicType = void 0;
const TE = __importStar(require("fp-ts/TaskEither"));
const fs = __importStar(require("fs"));
const fse = __importStar(require("fs-extra"));
const E = __importStar(require("fp-ts/Either"));

@@ -36,2 +38,3 @@ const function_1 = require("fp-ts/function");

writeToFile: (path, value) => (0, function_1.pipe)((0, Try_1.tryToEither)(() => fs.writeFileSync(path, JSON.stringify(value))), E.map(() => undefined)),
writeToFileAsync: (path, value) => (0, function_1.pipe)(TE.tryCatch(() => fse.writeFile(path, JSON.stringify(value)), (err) => new Error(err.message)), TE.map(() => undefined)),
safeCast: (dynamicType, codec) => codec.decode(dynamicType),

@@ -38,0 +41,0 @@ };

2

package.json
{
"name": "@trayio/commons",
"version": "2.2.0",
"version": "2.3.0",
"description": "Extensions to the standard/core libraries and basic features",

@@ -5,0 +5,0 @@ "exports": {

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