is-trademarked
Version:
Check if a word is trademarked.
77 lines (53 loc) • 1.65 kB
Markdown
> Check if a word is trademarked.
```bash
$ npm install --save is-trademarked
```
```js
const isTrademarked = require('is-trademarked')
// not trademarked yet
isTrademarked('unicorns')
.then(trademarked => {
console.log(trademarked) //=> false
})
// trademarked
// return an array which contains a single item
isTrademarked('apple')
.then(trademarks => {
if (trademarks) {
trademarks.forEach(t => console.log(t.wordmark))
}
})
// wildcard
// return an array which contains multiple items
// it searches `macbook` `macbook air` etc...
isTrademarked('mac*')
.then(/* your code */)
```
Type: `string`
The term to search. Support wildcard by using `*` symbol.
Type: `object`
API token to retrieve data from `markerapi.com`, sign up to get one [here](http://www.markerapi.com/) for free.
```js
[
{
wordmark: 'NAME',
reg: Tue May 20 2008 00:00:00 GMT+0800 (CST),
description: 'General feature magazines',
sn: '77119087',
serviceCode: 'GS0161'
}
]
```
- [is-trademarked-cli](https://github.com/egoist/is-trademarked-cli) - CLI for this module
MIT © [EGOIST](https://github.com/egoist)