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

notmytype

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

notmytype - npm Package Compare versions

Comparing version 0.1.5 to 1.0.0

.eslintrc

3

assert.js

@@ -84,2 +84,4 @@ /**

const Sym = define('function', function(x) { return typeof x === 'symbol'; });
function validate(x/*: any*/, type/*: any*/, ctx/*?: ?ValidationContext*/, failOnFirstError/*?: boolean*/) {

@@ -314,2 +316,3 @@ if(type.validate) {

'function': Func,
symbol: Sym,
list,

@@ -316,0 +319,0 @@ optional,

@@ -49,2 +49,3 @@ "use strong";

T.function = assert.function;
T.symbol = assert.symbol;
T.list = assert.list;

@@ -51,0 +52,0 @@ T.optional = assert.optional;

4

package.json
{
"name": "notmytype",
"version": "0.1.5",
"version": "1.0.0",
"description": "Type-check your function inputs with syntax like T(s, T.string, buf, Buffer, strings, T.list(T.string))",

@@ -21,3 +21,3 @@ "homepage": "https://github.com/ludios/notmytype",

"devDependencies": {
"eslint": "^0.21.2",
"eslint": "^0.23.0",
"mocha": "^2.2.5"

@@ -24,0 +24,0 @@ },

@@ -53,2 +53,3 @@ notmytype

T({"hello": 3, "extra": "s"}, T.shape({"hello": T.number}));
T(Symbol('a'), T.symbol);
```

@@ -55,0 +56,0 @@

@@ -65,2 +65,18 @@ /**

describe('symbol', function() {
it('is() should return false if x is not a symbol', function() {
assert.strictEqual(
f.symbol.is('Symbol(a)'),
false
);
});
it('is() should return true if x is a symbol', function() {
assert.strictEqual(
f.symbol.is(Symbol('a')),
true
);
});
});
describe('number', function() {

@@ -67,0 +83,0 @@ it('is() should return false if x is not a number', function() {

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