@mizdra/poke-nature
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

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, 'すっぱい', ...]

対応言語

de en es fr it ja ko

ビルド

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

テスト

$ npm run test

構文チェック

$ npm run lint

Dependencies (0)

    Dev Dependencies (10)

    Package Sidebar

    Install

    npm i @mizdra/poke-nature

    Weekly Downloads

    0

    Version

    0.2.0

    License

    MIT

    Last publish

    Collaborators

    • mizdra