Socket
Socket
Sign inDemoInstall

hoek

Package Overview
Dependencies
Maintainers
1
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hoek - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

.travis.yml

10

lib/hoek.js

@@ -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);

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