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

@algebraic/type

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@algebraic/type - npm Package Compare versions

Comparing version 1.0.0-alpha.1 to 1.0.0-alpha.2

12

data.js

@@ -38,4 +38,7 @@ const { declaration, fNamed, is, getTypename } = require("./declaration");

const getChildren = () => children || (children = fParseMap(fieldDefinitions));
const constructor = fNamed(`${typename}`, function (fields)
const create = fNamed(`[create ${typename}]`, function (fields)
{
if (!(this instanceof type))
return new type(fields);
if (!fields)

@@ -63,6 +66,5 @@ throw TypeError(`${typename} cannot be created without any fields.`);

});
constructor.prototype.toString = function () { return inspect(this) };
const create = fNamed(`[create ${typename}]`,
fields => new constructor(fields));
const is = value => value instanceof constructor;
type.prototype.toString = function () { return inspect(this) };
const is = value => value instanceof type;
const serialize = [toSerialize(typename, getChildren), false];

@@ -69,0 +71,0 @@ const deserialize = toDeserialize(typename, getChildren, type);

{
"name": "@algebraic/type",
"version": "1.0.0-alpha.1",
"version": "1.0.0-alpha.2",
"description": "",

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

const Map = global.Map;
const { getSerialize } = require("./declaration");
const { getPrototypeOf } = Object;

@@ -5,0 +4,0 @@

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