@hanakla/arma
v0.3.3
Published
Single killer functions of Web frontend
Downloads
125
Readme
@hanakla/arma
Floor killer single functions for Web frontend
Functions
See details from type definition and カン.
CSS
cssurl
- null safe cssurl()
wrapper.
DOM
selectFile
- open file selectorletDownload
- Allow users to download blob as fileClipBoardUtil
loadImage
- load image by urlloadImageFromBlob
- load image by blob
React Hooks
useAsyncEffect
useChangedEffect
useObjectState
useSetRef
useCombineRef
- combile multiple refs into one refuseCurrentVisibleAnchorName
useIntersection
useFunk
- Dependecy freeuseCallback
String
lineBreakToSpace
ellipsisString
trimString
styled-components
styleWhen
- conditional styling helper function
Lang feature
rescue
- exception handling functionmatch
- simple pattern mather
bili.config
import defaultConfig from '@hanakla/arma/dist/bili.config.base'
import { Config } from 'bili'
import typescript from 'rollup-plugin-typescript2'
import { defaultBiliConfig } from '../../bili.default.config'
export default {
input: 'src/index.ts',
plugins: {
typescript2: typescript(),
terser: defaultConfig.plugins.terser,
},
babel: defaultConfig.babel,
bundleNodeModules: defaultConfig.bundleNodeModules,
output: {
format: ['cjs', 'esm'],
},
} as Config