@basichelpers/pulldown

0.0.4 • Public • Published

Install the dependencies

npm install @basichelpers/pulldown

how to use

import { getYearOptions, getMonthOptions, getDatesOptions } from '@basichelpers/pulldown'

// [2021, 2022, 2023, 2024, ...] // lenght: 10
getYearOptions()
// [1950, 1951, 1952, 1953, ...] // lenght: 100
getYearOptions(1950, 100)

// [1, 2, 3, 4, 5, 6, ...]
getMonthOptions()
// [12, 11, 10, 9, 8, ...]
getMonthOptions().reverse()

// [1, 2, 3, 4, ... 30, 31]
getDatesOptions()
// [1, 2, 3, 4, ... 27, 28]
getDatesOptions(2020, 2)
import { getPrefOptions, getLocalOptions } from '@basichelpers/pulldown'
// ['北海道', '青森県', '岩手県', '宮城県', ...]
getPrefOptions()

// ['北海道', '東北', ... '九州']
getLocalOptions()
// [{data: '北海道', array: ['北海道']}, {data: '東北', array: ['茨城県', '栃木県', ...]}, ...]
getLocalOptions(true)

Readme

Keywords

none

Package Sidebar

Install

npm i @basichelpers/pulldown

Weekly Downloads

3

Version

0.0.4

License

MIT

Unpacked Size

9.11 kB

Total Files

8

Last publish

Collaborators

  • keijunakashima