suggested-name
v0.1.0
Published
JavaScript library for suggesting common name.
Readme
Suggested name
JavaScript library for suggesting common name. Suggested name is composed of words occurring in all given names.
names (input)|suggested name (output) --- | --- Fire Kids Edition Tablet 7" Display Wi-Fi 8 GB Black Fire Tablet 7" Display Wi-Fi 8 GB Magneta Fire Tablet 7" Display Wi-Fi 8 GB Blue|Fire Tablet 7" Display Wi-Fi 8 GB
Usage
var suggestedName = require('suggested-name');
suggestedName([
'Fire Kids Edition Tablet 7" Display Wi-Fi 8 GB Black',
'Fire Tablet 7" Display Wi-Fi 8 GB Magneta',
'Fire Tablet 7" Display Wi-Fi 8 GB Blue'
]); // = 'Fire Tablet 7" Display Wi-Fi 8 GB'Remove given characters from names:
suggestedName([
'Fire Tablet (7" Display Wi-Fi 8 GB Black)',
'Fire Tablet (7" Display Wi-Fi 8 GB Magneta)',
'Fire Tablet (7" Display Wi-Fi 8 GB Blue)'
], ['(', ')']); // = 'Fire Tablet 7" Display Wi-Fi 8 GB'More examples can be found in tests.
Installation
npm install --save suggested-nameFeatures
Scripts
npm run build- produces production version under thelibfoldernpm run dev- produces development version and runs a watchernpm run test- runs the tests
Changelog
0.1.0 (2016-01-10)
- initial relase
Credits
This project was created using webpack-library-starter.
License
This project is licensed under the MIT license.
