Skip to content

Latest commit

 

History

History
65 lines (56 loc) · 2.4 KB

README.md

File metadata and controls

65 lines (56 loc) · 2.4 KB

jrmf-utils

npm Build Status codecov npm

jrmf-utils JavaScript tool library

Internal encapsulates the commonly used browser object, array, function, purpose is to achieve the effect of the box.

Installation

Using npm

npm install jrmf-utils // or yarn add jrmf-utils

In a browser

<script src="https://cdn.jsdelivr.net/npm/jrmf-utils/dist/jrmf-utils.js"></script>
<script>
jrmfUtils.isPhone('1510166000') // return false
</script>

CommonJs

// Load the full build.
const jrmfUtils = require('jrmfUtils')
jrmfUtils.isPhone('1510166000') // return false

// Load method categories.
const isPhone = require('jrmfUtils/isPhone')
// or ES6
import isPhone from 'jrmfUtils/isPhone'

isPhone('1510166000') // return false

Docs

Array

isEqual

Browser

mBrowser

Regexp

isPhone isEmail isCardNo isBankno isChinese

DOM

Scroll

getScrollTop setScrollTop

Spinner

Spinner

/**
  * 'android', 'ios', 'ios-small', 'bubbles', 'circles', 'crescent', 'dots', 'lines', 'ripple', 'spiral'
*/
var ele = $('.v-spinner')
jrmfUtils.Spinner(ele[0], 'android')     

License

MIT