UNPKG

@nknahom/lotide

Version:

Lotide is mini clone of the Lodash (https://lodash.com) library for learning JavaScript. What is Lodash? Lodash is a library that makes JavaScript easier by taking the hassle out of working with arrays, numbers, objects, strings, etc.

13 lines (10 loc) 278 B
const assert = require("chai").assert; const head = require("../head"); describe("#head", () => { it("returns 1 for [1,2,3]", () => { assert.strictEqual(head([1, 2, 3]), 1); }); it("returns '5' for ['5']", () => { assert.strictEqual(head(["5"]), "5"); }); });