Comparing version 0.0.2 to 0.0.3
@@ -1,3 +0,3 @@ | ||
export { default as StdDraw } from "./StdDraw"; | ||
export { default as StdDraw } from './StdDraw'; | ||
export { default as StdOut } from './StdOut'; | ||
export { default as StdRandom } from './StdRandom'; |
@@ -283,4 +283,3 @@ "use strict"; | ||
}; | ||
StdDraw.show = function (time) { | ||
}; | ||
StdDraw.show = function (time) { }; | ||
StdDraw._polygonPath = function (x, y) { | ||
@@ -346,3 +345,2 @@ assert_1.default(!!x, 'x-coordinate array'); | ||
exports.default = StdDraw; | ||
6; | ||
//# sourceMappingURL=index.js.map |
export default function assert(x: boolean, message: string): void; | ||
export declare function assertSafeNumber(x: number | number[], message?: string): void; |
@@ -9,2 +9,17 @@ "use strict"; | ||
exports.default = assert; | ||
function assertSafeNumber(x, message) { | ||
if (message === void 0) { message = 'Must be valid number'; } | ||
if (!Array.isArray(x) && (!x || !Number.isFinite(x) || Number.isNaN(x))) { | ||
throw new Error(message); | ||
} | ||
if (Array.isArray(x)) { | ||
for (var _i = 0, _a = x; _i < _a.length; _i++) { | ||
var item = _a[_i]; | ||
if (!item || !Number.isFinite(item) || Number.isNaN(item)) { | ||
throw new Error(message); | ||
} | ||
} | ||
} | ||
} | ||
exports.assertSafeNumber = assertSafeNumber; | ||
//# sourceMappingURL=assert.js.map |
{ | ||
"name": "algs4", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "The book Algorithms's implementation, written with TypeScript", | ||
"main": "lib/index.js", | ||
"files": ["lib"], | ||
"files": [ | ||
"lib" | ||
], | ||
"types": "./lib/index.d.ts", | ||
@@ -12,4 +14,5 @@ "repository": "git@github.com:devrsi0n/Algorithms.git", | ||
"scripts": { | ||
"test": "jest", | ||
"build": "tsc", | ||
"prepublishOnly": "yarn run build" | ||
"prepublishOnly": "yarn run build && yarn test" | ||
}, | ||
@@ -21,5 +24,7 @@ "devDependencies": { | ||
"@babel/preset-typescript": "^7.6.0", | ||
"@jest-runner/electron": "^2.0.2", | ||
"@types/jest": "^24.0.19", | ||
"babel-jest": "^24.9.0", | ||
"jest": "^24.9.0", | ||
"ts-jest": "^24.1.0", | ||
"typescript": "^3.6.4" | ||
@@ -26,0 +31,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
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
64591
32
1230
0
10