Travis build: 1358 [cron]

This commit is contained in:
30secondsofcode
2018-01-23 20:11:51 +00:00
parent 7999ad6271
commit ac8f842b93
30 changed files with 509 additions and 36 deletions

View File

@ -0,0 +1,8 @@
const deepClone = obj => {
let clone = Object.assign({}, obj);
Object.keys(clone).forEach(
key => (clone[key] = typeof obj[key] === 'object' ? deepClone(obj[key]) : obj[key])
);
return clone;
};
module.exports = deepClone

View File

@ -0,0 +1,13 @@
const test = require('tape');
const deepClone = require('./deepClone.js');
test('Testing deepClone', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof deepClone === 'function', 'deepClone is a Function');
//t.deepEqual(deepClone(args..), 'Expected');
//t.equal(deepClone(args..), 'Expected');
//t.false(deepClone(args..), 'Expected');
//t.throws(deepClone(args..), 'Expected');
t.end();
});