check-type
Advanced tools
Comparing version
{ | ||
"name": "check-type", | ||
"version": "0.4.3", | ||
"main": [ | ||
"./lib/check-type.js" | ||
], | ||
"description": "Library to check variable type and properties in object.", | ||
"author": "Alistair Brown <github@alistairjcbrown.com>", | ||
"bugs": "https://github.com/alistairjcbrown/check-type/issues", | ||
"contributors": [], | ||
"dependencies": { | ||
"underscore": "~1.6.0" | ||
}, | ||
"homepage": "https://github.com/alistairjcbrown/check-type", | ||
"keywords": [ | ||
"util", | ||
"type", | ||
"check", | ||
"checking", | ||
"library" | ||
], | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/alistairjcbrown/check-type.git" | ||
} | ||
"name": "check-type", | ||
"version": "0.4.4", | ||
"main": "./lib/check-type.js", | ||
"description": "Library to check variable type and properties in object.", | ||
"author": "Alistair Brown <github@alistairjcbrown.com>", | ||
"bugs": "https://github.com/alistairjcbrown/check-type/issues", | ||
"contributors": [], | ||
"dependencies": { | ||
"underscore": "~1.6.0" | ||
}, | ||
"devDependencies": { | ||
"chai": "~1.9.1", | ||
"mocha": "~1.18.2", | ||
"sinonjs-built": "~1.8.2", | ||
"sinon-chai": "~2.5.0" | ||
}, | ||
"homepage": "https://github.com/alistairjcbrown/check-type", | ||
"keywords": [ | ||
"util", | ||
"type", | ||
"check", | ||
"checking", | ||
"library" | ||
], | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/alistairjcbrown/check-type.git" | ||
}, | ||
"ignore": [ | ||
"./Gruntfile.js", | ||
"./lib/examples/", | ||
"./lib/tests/" | ||
] | ||
} |
@@ -21,2 +21,4 @@ /* | ||
"!./**/bower_components/**/*{extension}", | ||
"!./components/**/*{extension}", | ||
"!./**/components/**/*{extension}", | ||
"!./.git/" | ||
@@ -115,4 +117,6 @@ ]; | ||
sync_meta = { | ||
"options": { | ||
"include": [ | ||
bower: { | ||
src: "package.json", | ||
dest: "bower.json", | ||
fields: [ | ||
"name", | ||
@@ -131,2 +135,20 @@ "description", | ||
] | ||
}, | ||
component: { | ||
src: "package.json", | ||
dest: "component.json", | ||
fields: [ | ||
"name", | ||
"description", | ||
"version", | ||
"author", | ||
"bugs", | ||
"contributors", | ||
// "dependencies", | ||
"homepage", | ||
"keywords", | ||
"license", | ||
"main" | ||
// "repository" | ||
] | ||
} | ||
@@ -153,3 +175,3 @@ }; | ||
"nice-package": check_meta, | ||
"sync": sync_meta, | ||
"update_json": sync_meta, | ||
"toc": generate_toc, | ||
@@ -159,8 +181,3 @@ }); | ||
// Load Tasks | ||
grunt.loadNpmTasks("grunt-contrib-jshint"); | ||
grunt.loadNpmTasks("grunt-mocha-test"); | ||
grunt.loadNpmTasks("grunt-mocha"); | ||
grunt.loadNpmTasks("grunt-sync-pkg"); | ||
grunt.loadNpmTasks("grunt-toc"); | ||
grunt.loadNpmTasks("grunt-nice-package"); | ||
require("load-grunt-tasks")(grunt); | ||
@@ -178,5 +195,6 @@ // Allow flag after test | ||
// Define tasks | ||
grunt.registerTask("hint", [ "jshint" ]); | ||
grunt.registerTask("lint", [ "jshint" ]); | ||
grunt.registerTask("test", mocha_tasks ); | ||
grunt.registerTask("go", [ "nice-package", "sync", "hint", "test" ]); | ||
grunt.registerTask("go", [ "lint", "test" ]); | ||
grunt.registerTask("build", [ "go", "toc", "nice-package", "update_json" ]); | ||
grunt.registerTask("default", [ "go" ]); | ||
@@ -183,0 +201,0 @@ |
{ | ||
"name": "check-type", | ||
"description": "Library to check variable type and properties in object.", | ||
"version": "0.4.3", | ||
"version": "0.4.4", | ||
"author": "Alistair Brown <github@alistairjcbrown.com>", | ||
@@ -12,4 +12,6 @@ "bugs": "https://github.com/alistairjcbrown/check-type/issues", | ||
"devDependencies": { | ||
"bower": "~1.3.1", | ||
"chai": "~1.9.1", | ||
"grunt": "~0.4.4", | ||
"grunt-cli": "~0.1.13", | ||
"grunt-contrib-jshint": "~0.9.2", | ||
@@ -19,4 +21,5 @@ "grunt-mocha": "~0.4.10", | ||
"grunt-nice-package": "~0.3.0", | ||
"grunt-sync-pkg": "~0.1.2", | ||
"grunt-toc": "~0.1.0", | ||
"grunt-update-json": "~0.1.3", | ||
"load-grunt-tasks": "~0.4.0", | ||
"mocha": "~1.18.2", | ||
@@ -27,3 +30,3 @@ "sinon": "~1.9.0", | ||
"engines": { | ||
"node": ">= 0.8.0" | ||
"node": ">=0.10" | ||
}, | ||
@@ -43,4 +46,8 @@ "homepage": "https://github.com/alistairjcbrown/check-type", | ||
"url": "git://github.com/alistairjcbrown/check-type.git" | ||
}, | ||
"scripts": { | ||
"postinstall": "./node_modules/bower/bin/bower install", | ||
"test": "./node_modules/grunt-cli/bin/grunt test" | ||
} | ||
} | ||
# check-type | ||
[](https://travis-ci.org/alistairjcbrown/check-type) | ||
A type checking framework for Javascript. | ||
@@ -8,3 +10,2 @@ | ||
## Table of Contents | ||
@@ -24,4 +25,2 @@ | ||
* [Test in Browser](#test-in-browser) | ||
* [Test in Browser under PhantomJS](#test-in-browser-under-phantomjs) | ||
* [Test All](#test-all) | ||
* [No Conflict](#no-conflict) | ||
@@ -43,3 +42,2 @@ * [Init](#init) | ||
--- | ||
@@ -126,33 +124,24 @@ | ||
### Test in Node.js | ||
Get all of the developer dependecies by running: | ||
``` | ||
npm install # install dev dependencies for running on node.js | ||
grunt test --nodejs # Run test in node.js | ||
npm install # install dev dependencies | ||
``` | ||
### Test in Browser | ||
### Test in Node.js | ||
``` | ||
bower install # install dev dependencies for running in browser | ||
# Open lib/test/check-type.test.html in browser | ||
grunt lint # Lint the code with JSHint | ||
grunt test --nodejs # Run all tests in node.js | ||
grunt test --browser # Run all tests in phantomjs | ||
grunt test # Run all tests in both environments | ||
grunt go # Run everything above | ||
``` | ||
### Test in Browser under PhantomJS | ||
### Test in Browser | ||
``` | ||
npm install # install dev dependencies for running on node.js | ||
bower install # install dev dependencies for running in browser | ||
grunt test --browser # Run test in phantomjs | ||
``` | ||
Open `lib/test/check-type.test.html` in browser | ||
### Test All | ||
``` | ||
npm install # install dev dependencies for running on node.js | ||
bower install # install dev dependencies for running in browser | ||
grunt test # Run tests | ||
``` | ||
## No Conflict | ||
@@ -159,0 +148,0 @@ |
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
High entropy strings
Supply chain riskContains high entropy strings. This could be a sign of encrypted data, leaked secrets or obfuscated code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
0
-100%2
-94.44%2
-87.5%88505
-92.35%14
27.27%2027
-92.58%319
-3.33%1
Infinity%