Comparing version 0.0.3 to 0.0.4
@@ -12,10 +12,2 @@ // Load modules | ||
// Get current date/time msec count | ||
exports.getTimestamp = function () { | ||
return (new Date()).getTime(); | ||
}; | ||
// Clone object or array | ||
@@ -132,3 +124,3 @@ | ||
exports.map = function (array, key) { | ||
exports.mapToObject = function (array, key) { | ||
@@ -135,0 +127,0 @@ if (array) { |
{ | ||
"name": "hoek", | ||
"description": "General purpose node utilities", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"author": "Eran Hammer <eran@hueniverse.com> (http://hueniverse.com)", | ||
@@ -6,0 +6,0 @@ "contributors":[ |
hoek | ||
==== | ||
General purpose node utilities | ||
General purpose node utilities | ||
[![Build Status](https://secure.travis-ci.org/walmartlabs/hoek.png)](http://travis-ci.org/walmartlabs/hoek) |
@@ -15,14 +15,2 @@ var assert = require('assert'); | ||
describe("#getTimestamp", function(){ | ||
it("should return a valid unix timestamp", function(done){ | ||
(function(){ | ||
var ts = hoek.getTimestamp(); | ||
ts.should.be.a('number'); | ||
var datetime = new Date(ts); | ||
(typeof datetime).should.equal('object'); | ||
}).should.not.throw(); | ||
done(); | ||
}) | ||
}) | ||
describe("#clone", function(){ | ||
@@ -58,6 +46,6 @@ it("should clone a nested object", function(done){ | ||
describe("#map", function(){ | ||
describe("#mapToObject", function () { | ||
it("should convert basic array to existential object", function(done){ | ||
var keys = [1,2,3,4]; | ||
var a = hoek.map(keys); | ||
var a = hoek.mapToObject(keys); | ||
for(var i in keys){ | ||
@@ -72,3 +60,3 @@ a[keys[i]].should.equal(true); | ||
var subkey = 'x'; | ||
var a= hoek.map(keys, subkey); | ||
var a = hoek.mapToObject(keys, subkey); | ||
for(var i in keys){ | ||
@@ -75,0 +63,0 @@ a[keys[i][subkey]].should.equal(true); |
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
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
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
9
7
0
13350
294
1