is-trademarked
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/is-trademarked package

1.2.1 • Public • Published

is-trademarked NPM version NPM downloads Build Status

Check if a word is trademarked.

Install

$ npm install --save is-trademarked

Usage

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 */)

API

isTrademarked(input, opts)

input

Type: string

The term to search. Support wildcard by using * symbol.

opts

Type: object

token

API token to retrieve data from markerapi.com, sign up to get one here for free.

return

[
  {
    wordmark: 'NAME',
    reg: Tue May 20 2008 00:00:00 GMT+0800 (CST),
    description: 'General feature magazines',
    sn: '77119087',
    serviceCode: 'GS0161'
  }
]

Related

License

MIT © EGOIST

Readme

Keywords

Package Sidebar

Install

npm i is-trademarked

Weekly Downloads

9

Version

1.2.1

License

MIT

Last publish

Collaborators

  • kchan