npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@hoangcung1804npm/ipsum-harum-animi

v1.0.0

Published

前端程序的一个公共方法库,包括:domReady、children、append、find、jsonFormData、setUrlParam等公共方法。

Downloads

1

Maintainers

hoangcung1804hoangcung1804

Keywords

optimizernodeURLSearchParamsless compilertraverseclonetrimRightcheckECMAScript 2023private datasyntaxlintUnderscoreweakmaprequireassignArray.prototype.flatcorepasswordhotjsonpathStyleSheetruntimefixed-widthgetvalideventEmitter[[Prototype]]StreamES8speedhardlinkstypedarraysemojiextrastatefullwidthendpointObject.valuessortedconsolevalidationreducertakeenvsymboleventDispatcherCSSStyleDeclarationdescriptorfastcopyanimationsignalsstyleguidereadcryptoless.jspnpm9readablelinkJSONgrouptostringtagobjRegExp#flagsform-validationregular expressionextensionmochalinuxinstallstdlibflagsdataviewdescriptionfindprotocol-buffersdragES7shamsearchsharedjson-schematextsigtermlanguagecommanderexpressvaluesarraystoStringTagwalkuuidclassnamesort$.extendbrowserlistperformantwatchersetImmediatecharactersgradients csspromisefromlengthgetintrinsiccodestoSortedincludesinvariantfigletfastclonemulti-packageprotoes2018jasminecensortoArraynodejseslintforEachES6posehasOwnexpressionbrowserslistspinnerspreserve-symlinksES2018callfsESargumentbusycorsRegExp.prototype.flagsArrayBufferparentnameescapeeslintconfigArray.prototype.filteroutputpropArray.prototype.includesesdataViewfind-uptypeofbannerlruvestWebSocketsquerystringartduplexpyyamlpostcssbcryptassertsbrowserframeworkfluxcompiler256pluginAsyncIteratorrgbfindupfindLastcoerciblewhatwgtaskloadingnested cssjestproxynopepostcss-pluginminimallibphonenumberurlUint32ArrayrangeerrorTypedArrayinterruptscurlES2017genericsextendES2016gesturesio-tspushtestingoptimisthelpersbundlerprefixshrinkwrapcss lessboundtermcallbindECMAScript 2022ArrayBuffer.prototype.slicerm -rfcjkcompile lessdependenciesES2021clifetchmkdirpregular expressionswaapies2015joivalidatea11ygetOwnPropertyDescriptordatemapzodbundlingphoneArraytoobjectMicrosoftclass-validatoryamlregexpstyledebugarraybufferObservablesdirreplayhandlerserror-handlingtypedarraypredictableTypeBoxsignalgraphqlmatchesbyteLengthnumber_.extendcryptpositiveargparseSetttyReflect.getPrototypeOfauthchromiumcomputed-typeslasttesterestreeformObject.definePropertyexecsomecharacteriterateES5classnamesECMAScript 7circulartapedatastructureObjectfindLastIndexformsdayjschaiopenInt16ArrayconfigurablejQuerytslibenvironmentPushdeep-cloneyupauthenticationcss-in-jssettercompareBigUint64Arrayagentoperating-systemxhrstringifytsECMAScript 3reuseHyBimomentconnecteslintpluginECMAScript 2021debugger.envomitlookCSSECMAScript 6spinnerschemeqswaithttpprivateSymbol.toStringTagstablewatchFileECMAScript 2016mimeinternal slotequalpipetypesArrayBuffer#slicelesscsstoolsjson-schema-validatorinferencelessprotobufObject.isreadablestreamArray.prototype.findLastmetadatagetoptdom-testing-libraryl10npropertiesassertgroupByoffsetwriteReactiveExtensionsinstallercollectiongetterutilitywhichcolumnstylesbootstrap cssUint8Arraycss nestingguidinternalinspectwordbreakobjectgdprcontainsenumerableidpromisesreduxcolorsmacossequenceweaksetprocesslimitreact animationes8specsuperstructequalityjson-schema-validationECMAScript 2020domprototypesetFloat32Arraymoveoptionviewparser

Readme

@hoangcung1804npm/ipsum-harum-animi

前端程序的一个公共方法库,包括:domReady、children、append、find、jsonFormData、setUrlParam等公共方法。

安装


npm i @hoangcung1804npm/ipsum-harum-animi

使用

代码中先引入后正常调用其包括的方法

//根据实际需要引入方法
import {domReady,jsonFormData} from '@hoangcung1804npm/ipsum-harum-animi';

方法说明

domReady

HTML页面加载完成后触发执行

代码示例


import {
    domReady
} from '@hoangcung1804npm/ipsum-harum-animi'
import xqTabForm from "./xq-tab-form";

domReady(() => {
    xqTabForm()
})

windowReady

HTML网页窗口加载完成后触发执行

代码示例


import {
    windowReady
} from '@hoangcung1804npm/ipsum-harum-animi'
import xqTabForm from "./xq-tab-form";

windowReady(() => {
    xqTabForm()
})

slideUp

HTML网页元素向上缩起(隐藏元素)

代码示例


import {
    slideUp
} from '@hoangcung1804npm/ipsum-harum-animi'

const testElement=document.querySelector('#test')
//#test元素将被隐藏(向上缩小直到高度为0)
slideUp(testElement)
slideUp(testElement,500)//可以设置隐藏动画持续的时间

slideDown

HTML网页元素向下展示(显示元素)

代码示例


import {
    slideDown
} from '@hoangcung1804npm/ipsum-harum-animi'

const testElement=document.querySelector('#test')
//#test元素将被向下展示出来(高度为元素能显示完的高度)
slideDown(testElement)
slideDown(testElement,500)//可以设置向下展示动画持续的时间

slideToggle

HTML网页元素显示与隐藏切换,显示变隐藏,隐藏会变显示

代码示例


import {
    slideToggle
} from '@hoangcung1804npm/ipsum-harum-animi'

const testElement=document.querySelector('#test')
slideToggle(testElement)
slideToggle(testElement,500)//可以设置动画持续的时间

children

返回HTML元素匹配选择器的子元素数组

代码示例


import {
    children
} from '@hoangcung1804npm/ipsum-harum-animi'

const testElement=document.querySelector('#test')
//返回#test下匹配#t1选择器的子元素数组
children(testElement,'#t1')

parent

返回HTML元素匹配选择器的一个父元素

代码示例


import {
    parent
} from '@hoangcung1804npm/ipsum-harum-animi'

const testElement=document.querySelector('#test')
//返回#test下匹配#t1选择器的一个父元素
parent(testElement,'#t1')

parents

返回HTML元素匹配选择器的父元素数组

代码示例


import {
    parents
} from '@hoangcung1804npm/ipsum-harum-animi'

const testElement=document.querySelector('#test')
//返回#test下匹配#t1选择器的父元素数组
parents(testElement,'#t1')

prev

返回HTML元素匹配选择器的前面相邻元素数组

代码示例


import {
    prev
} from '@hoangcung1804npm/ipsum-harum-animi'

const testElement=document.querySelector('#test')
//返回#test下匹配#t1选择器的前面相邻元素数组
prev(testElement,'#t1')

next

返回HTML元素匹配选择器的后面相邻元素数组

代码示例


import {
    next
} from '@hoangcung1804npm/ipsum-harum-animi'

const testElement=document.querySelector('#test')
//返回#test下匹配#t1选择器的后面相邻元素数组
next(testElement,'#t1')

append

在HTML元素内部最后面添加元素(字符串形式表示)

代码示例


import {
    append
} from '@hoangcung1804npm/ipsum-harum-animi'

const testElement=document.querySelector('#test')
//返回#test元素内部最后面添加<p>添加的元素</p>
append(testElement,'<p>添加的元素</p>')

prepend

在HTML元素内部最前面添加元素(字符串形式表示)

代码示例


import {
    prepend
} from '@hoangcung1804npm/ipsum-harum-animi'

const testElement=document.querySelector('#test')
//返回#test元素内部最前面添加<p>添加的元素</p>
prepend(testElement,'<p>添加的元素</p>')

before

在HTML元素前面添加元素(字符串形式表示)

代码示例


import {
    before
} from '@hoangcung1804npm/ipsum-harum-animi'

const testElement=document.querySelector('#test')
//返回#test元素前面添加<p>添加的元素</p>
before(testElement,'<p>添加的元素</p>')

after

在HTML元素后面添加元素(字符串形式表示)

代码示例


import {
    after
} from '@hoangcung1804npm/ipsum-harum-animi'

const testElement=document.querySelector('#test')
//返回#test元素后面添加<p>添加的元素</p>
after(testElement,'<p>添加的元素</p>')

find

查找指定选择器的HTML元素数组

代码示例


import {
    find
} from '@hoangcung1804npm/ipsum-harum-animi'
//返回所有p标签元素数组
find('p')

findOne

查找指定选择器的一个HTML元素

代码示例


import {
    findOne
} from '@hoangcung1804npm/ipsum-harum-animi'
//返回一个p标签元素
findOne('p')

jsonFormData

将指定的表单填写的数组转为json格式

代码示例


import {
    jsonFormData
} from '@hoangcung1804npm/ipsum-harum-animi'
const form=findOne('#form1')
const json=jsonFormData(form)