Comparing version 1.0.0 to 1.0.1
55
index.js
@@ -1,7 +0,54 @@ | ||
//index.js | ||
function al() { | ||
function hello() { | ||
return "hello Altitude" | ||
let data = [] | ||
let intervals = [] | ||
function table(data, options = {}) { | ||
let { | ||
mode = "startstop" | ||
} = options; | ||
data = data | ||
} | ||
table.data = function (_) { | ||
return arguments.length | ||
? (data = _, table) | ||
: data; | ||
}; | ||
table.extent = () => { | ||
let start = Infinity; | ||
let end = -Infinity; | ||
for (let i = 0; i < data.length; i++) { | ||
start = Math.min(start, data[i][0]); | ||
end = Math.max(end, data[i][1]); | ||
} | ||
return [start, end]; | ||
} | ||
table.sort_by_start = () => { | ||
data.sort((a, b) => { | ||
return a[0] - b[0]; | ||
}); | ||
return data; | ||
} | ||
table.sort_by_end = () => { | ||
data.sort((a, b) => { | ||
return a[1] - b[1]; | ||
}); | ||
return data; | ||
} | ||
table.duration = () => { | ||
return intervals == null ? 0 : intervals[0][1] - intervals[0][0]; | ||
} | ||
return table | ||
} | ||
module.exports = hello | ||
module.exports = al |
{ | ||
"name": "altitude", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "tape -r esm 'test/**/*-test.js'" | ||
}, | ||
@@ -21,3 +21,7 @@ "repository": { | ||
}, | ||
"homepage": "https://github.com/romsson/altitude#readme" | ||
} | ||
"homepage": "https://github.com/romsson/altitude#readme", | ||
"devDependencies": { | ||
"tape": "^5.6.6", | ||
"esm": "3" | ||
} | ||
} |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
2358
4
47
0
1
34
0
2