0.1.1 • Published 2 years ago
pravinc-palindrome v0.1.1
Setup Procedure
- Init npm package
$ npm init package name: (ch8.1_listing_8.1) pravinc-palindrome version: (1.0.0) 0.1.0 description: Palindrome detector entry point: (index.js) test command: mocha git repository: keywords: palindrome learn-enough JavaScript author: Pravin Chenthilkumar
- add mocha dependency
npm install --save-dev mocha
- install dependencies
npm install
- run test - also select 'Debug' from package.json
npm test
- import module and validate from node REPL
> let Phrase = require("./index.js"); > new Phrase("Madam, I’m Adam.").palindrome();