New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

option-t

Package Overview
Dependencies
Maintainers
1
Versions
333
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

option-t - npm Package Compare versions

Comparing version 0.5.1 to 0.5.2

6

CHANGELOG.md

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

## 0.5.2
### Internal
* Share the same object as prototype between `OptionT.Some` and `OptionT.None`.
## 0.5.1

@@ -7,0 +13,0 @@

2

package.json
{
"name": "option-t",
"version": "0.5.1",
"version": "0.5.2",
"description": "Option type implementation whose APIs are inspired by Rust's `Option<T>`.",

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

@@ -27,3 +27,14 @@ /*

var OptionTProto = Object.freeze({
/**
* @constructor
* @template T
*
* A base object of `Option<T>`.
* This is only used to `option instanceof OptionT`
* in an language environment which does not have an interface type system.
*
* The usecase example is a `React.PropTypes.
*/
var OptionT = function OptionTBase() {};
OptionT.prototype = Object.freeze({
/**

@@ -181,14 +192,3 @@ * Return whether this is `Some<T>` or not.

/**
* @constructor
* @template T
*
* A base object of `Option<T>`.
* This is only used to `option instanceof OptionT`
* in an language environment which does not have an interface type system.
*
* The usecase example is a `React.PropTypes.
*/
var OptionT = function OptionTBase() {};
OptionT.prototype = OptionTProto;
var OptionPrototype = new OptionT();

@@ -217,3 +217,3 @@ /**

};
Some.prototype = new OptionT();
Some.prototype = OptionPrototype;

@@ -240,3 +240,3 @@ /**

};
None.prototype = new OptionT();
None.prototype = OptionPrototype;

@@ -243,0 +243,0 @@ module.exports = {

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