Socket
Socket
Sign inDemoInstall

@fp-ts/data

Package Overview
Dependencies
Maintainers
3
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fp-ts/data - npm Package Compare versions

Comparing version 0.0.29 to 0.0.30

8

Context.d.ts

@@ -27,6 +27,12 @@ /**

/**
* Specifying the key will make the Tag global, meaning two tags with the same
* key will map to the same instance.
*
* Note: this is useful for cases where live reload can happen and it is
* desireable to preserve the instance across reloads.
*
* @since 1.0.0
* @category constructors
*/
export declare const Tag: <Service>() => Tag<Service>;
export declare const Tag: <Service>(key?: string) => Tag<Service>;
declare const TypeId: unique symbol;

@@ -33,0 +39,0 @@ /**

@@ -16,6 +16,12 @@ "use strict";

/**
* Specifying the key will make the Tag global, meaning two tags with the same
* key will map to the same instance.
*
* Note: this is useful for cases where live reload can happen and it is
* desireable to preserve the instance across reloads.
*
* @since 1.0.0
* @category constructors
*/
const Tag = () => new C.TagImpl();
const Tag = key => new C.TagImpl(key);
exports.Tag = Tag;

@@ -22,0 +28,0 @@ const TypeId = C.ContextTypeId;

@@ -25,5 +25,15 @@ "use strict";

class TagImpl {
constructor() {
constructor(key) {
this.key = key;
this._id = TagTypeId;
this._S = _ => _;
if (key) {
if (!(TagTypeId in globalThis)) {
globalThis[TagTypeId] = {};
}
if (!(key in globalThis[TagTypeId])) {
globalThis[TagTypeId][key] = this;
}
return globalThis[TagTypeId][key];
}
}

@@ -30,0 +40,0 @@ [Equal.symbolEqual](that) {

2

package.json
{
"name": "@fp-ts/data",
"version": "0.0.29",
"version": "0.0.30",
"license": "MIT",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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