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

contractis

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

contractis - npm Package Compare versions

Comparing version 0.0.14 to 0.0.15-alpha.0

2

is.js

@@ -28,3 +28,3 @@ const gen = require("./generators");

generate: () =>
isnum((opts || {}).lte) && isnum((opts || {}).lte)
isnum((opts || {}).gte) && isnum((opts || {}).lte)
? gen.num_between(opts.lte, opts.gte)

@@ -31,0 +31,0 @@ : isnum((opts || {}).lte)

{
"name": "contractis",
"version": "0.0.14",
"version": "0.0.15-alpha.0",
"description": "Design by Contract for JavaScript",

@@ -21,3 +21,3 @@ "repository": "github:saltcorn/saltcorn",

},
"gitHead": "776883807352b79551cab678f76027892934260f"
"gitHead": "0b9f7470e0c42789b3d6d579d3f49cf4e336003e"
}
const { contract, is, auto_test } = require(".");
const { ContractViolation } = require("./util.js");
const gen = require("./generators");
describe("disable", () => {

@@ -423,1 +425,20 @@ it("should exist", () => {

});
describe("generate", () => {
it("gen pos not nan", () => {
const rnd = gen.num_positive();
expect(typeof rnd).toBe("number");
expect(isNaN(rnd)).toBe(false);
});
it("num not nan", () => {
const rnd = is.number({ lte: 5.0 }).generate();
expect(typeof rnd).toBe("number");
expect(isNaN(rnd)).toBe(false);
});
it("int not nan", () => {
const rnd = is.integer({ lte: 5 }).generate();
expect(typeof rnd).toBe("number");
expect(isNaN(rnd)).toBe(false);
});
});
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