0.2.0 • Published 8 years ago

@mizdra/poke-nature v0.2.0

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

poke-nature npm (scoped) Build Status

ポケモン性格クラス。

特徴

  • TypeScriptによる型補完。

インストール

$ npm install @mizdra/poke-nature

使い方

import {ja as PokeNature} from '@mizdra/poke-nature';

console.log(PokeNature.toNumber('おくびょう')); // 10
console.log(PokeNature.toString(10)); // 'おくびょう'
console.log(PokeNature.getIncreasedStat(10)); // 'すばやさ'
console.log(PokeNature.getDecreasedStat(10)); // 'こうげき'
console.log(PokeNature.getFavoriteFlavor(10)); // 'あまい'
console.log(PokeNature.getDislikedFlavor(10)); // 'からい'
console.log(PokeNature.NAMES); // ['がんばりや', 'さみしがり', ...]
console.log(PokeNature.INCREASED_STATS); // [null, 'こうげき', ...]
console.log(PokeNature.DECREASED_STATS); // [null, 'ぼうぎょ', ...]
console.log(PokeNature.FAVORITE_FLAVORS); // [null, 'からい', ...]
console.log(PokeNature.DISLIKED_FLAVORS); // [null, 'すっぱい', ...]

対応言語

deenesfritjako

ビルド

$ git clone https://github.com/mizdra/poke-nature.git
$ cd poke-nature
$ npm install
$ npm run build

テスト

$ npm run test

構文チェック

$ npm run lint