diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..953380a --- /dev/null +++ b/.eslintrc @@ -0,0 +1,14 @@ +{ + "extends": "airbnb-base", + "rules": { + "no-use-before-define": [ + "error", { + "functions": false + } + ], + "linebreak-style": 0 + }, + "env": { + "browser": true + } +} \ No newline at end of file diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..9cf9495 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +package-lock=false \ No newline at end of file diff --git a/index.js b/index.js new file mode 100644 index 0000000..5671701 --- /dev/null +++ b/index.js @@ -0,0 +1,7 @@ + + +function jeffsum(number, textType) { + return 'hello'; +} + +module.exports = jeffsum; diff --git a/package.json b/package.json new file mode 100644 index 0000000..45eec3f --- /dev/null +++ b/package.json @@ -0,0 +1,34 @@ +{ + "name": "jeffsum", + "version": "0.0.1", + "description": "Jeff Goldblum text placeholder generator of pure amazingness.", + "license": "MIT", + "author": "Christopher Voigt ", + "homepage": "http://jeffsum.com/", + "main": "index.js", + "scripts": { + "lint": "eslint --quiet index.js test/**/*.js", + "test": "mocha" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/chlorophyllkid/jeffsum.git" + }, + "bugs": { + "url": "https://github.com/chlorophyllkid/jeffsum/issues" + }, + "keywords": [ + "jeff", + "goldblum", + "lorem", + "ipsum", + "generator" + ], + "devDependencies": { + "chai": "^4.2.0", + "eslint": "^5.11.0", + "eslint-config-airbnb-base": "^13.1.0", + "eslint-plugin-import": "^2.14.0", + "mocha": "^5.2.0" + } +} diff --git a/test/jeffsum.spec.js b/test/jeffsum.spec.js new file mode 100644 index 0000000..bc4bd9e --- /dev/null +++ b/test/jeffsum.spec.js @@ -0,0 +1,12 @@ +/* global describe, it */ + +const { assert } = require('chai'); + +const jeffsum = require('../index.js'); + +describe('jeffsum', () => { + it('should return 5 characters on jeffsum(5, "characters")', () => { + const text = jeffsum(5, 'characters'); + assert.lengthOf(text, 5); + }); +});