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

datadancer

v0.1.1-alpha

Published

## What is DataDancer?

Downloads

13

Readme

DataDancer

What is DataDancer?

DataDancer provides you with methods to easily get various data.

Representative function is Name Generator, Password Generator, getRanRangeNum Method on NumberMethods.

You can also receive data of various data types through DataDancer to receive other types of data or refined data.

You can also get the calculated value of standard deviation, variance, etc.,

you can sort the array or remove the middle element of the array and get the array elements randomly,

for Date type object you can add month, day to Date object and you can get the day of the week.

Docs Site

site

If you want to know how to use, parametric, return type, etc.,

Please refer to the documentation site.

There is a music player on the document site so that you can learn without getting bored.

Enjoy!

DataDancer Docs

npm

DataDancer npm

Install

$ npm i datadancer

How to use?

import DataDancer from 'datadancer';

// Create a class with the methods you want to use
const am = new DataDancer.ArrayMethods();
const sm = new DataDancer.StringMethods();
const nm = new DataDancer.NumberMethods();
const vm = new DataDancer.VisualMethods();
const dm = new DataDancer.DateMethods();

API

ArrayMethods

|Method|Parameter / Type / isOptional|ReturnType|Detail| |---|----|---|---| |quickSort|1. arr / Array / false, 2. key / string / true |Array|This is quick sort.You can also sorting object array by key.| |binarySearch|1. arr / Array / false, 2. search / any / false key / string / true |Object{ idx: number(array index), val: Any }|It is a search function that allows you to quickly search in an array sorted in ascending order.You can also search object array by key.| |linearSearch|1. arr / Array / false, 2. search / any / false key / string / true |Object{ idx: number(array index), val: Any }|It is a search function that allows you to quickly search in an array sorted in ascending order.You can also search object array by key.| |getRanElement|1. arr / Array / false, 2. howMany / number / true|Any | Any Array|If you want to get the elements of an array randomly, use getRanElement. It is also possible to get multiple random elements of an array.| |rmMiddleArrIdx|1. arr / Array / false, 2. target / number | number[] / false | Array |If you want to remove the middle element of an array, use rmMiddleArrIdx.It is also possible to remove multiple middle elements of an array.|

DateMethods

|Method|Parameter / Type / isOptional|ReturnType|Detail| |---|----|---|---| |addDays|1. date / Date / false, 2. dates / number / false |Date|add Day to Date type Object.| |addMonth|1. date / Date / false, 2. months / number / false |Date|add months to Date type Object.| |addYear|1. date / Date / false, 2. years / number / false |Date|add years to Date type Object.| |dateCompare|1. fastDate / Date / false, 2. latestDate / Date / false |Boolean|If you have 2 Date Type Object, dateCompare function gives you which date is latest.| |getDayOfWeek|1. date / Date / false, 2. lang / "eng" or "kor" or "jp" or "chi" or "india" or "hindi" or "german" / true |String|If you want to get day of the week to String type, use getDayOfWeek. Can be obtained by language| |getFormDate|1. date / Date / false, 2. form / string / false |String|If you want to get Date Type Object to String with your own Custom Form use getFormDate Function.|

NumberMethods

|Method|Parameter / Type / isOptional|ReturnType|Detail| |---|----|---|---| |sum|1. arr / Number Array / false|Number|If you want to get sum value of number array, use sum function| |avarage|1. arr / Number Array / false|Number|If you want to get avarage value of number array, use avarage function| |deviation|1. arr / Number Array / false|Object{ origin: array(entered Array), avarage: number(avarage value), deviation: number(deviation value) }|If you want to get deviation value of number array, use deviation function| |variance|1. arr / Number Array / false|Number|If you want to get variance value of number array, use variance function| |standardDeviation|1. arr / Number Array / false | Object{ variance: number(variance value), standardDeviation: number(standardDeviation value) } |If you want to get standardDeviation value of number array, use standardDeviation function| |getMinMax|1. arr / Number Array / false|Object{ min: number(minimum value), max: number(maximum value) }|If you want to get minimum and maximum value of number array, use getMinMax function| |getRanDigitNum|1. digit / Number / false2. isString / Boolean / true3. zeroFixBackDigit / Number / true|Number | String|If you want to get number of fixed digit randomly, use getRanDigitNum function| |getRanRangeNum|1. start / Number / false2. end / Number / false|Number|If you want to get number from a to b randomly, use getRanRangeNum function|

StringMethods

|Method|Parameter / Type / isOptional|ReturnType|Detail| |---|----|---|---| |nameGenerator|1. lang / "kor" or "eng" or "jp" or "chi" or "india" or "hindi" or "german" / true2. gender / "male" or "female" / true|String|If you want get name Randomly, use sum nameGenerator function.Default language value is English, Default gender value is maleYou can also set the language and gender.Supported Language: English, Korean, Japan, Chinese, India, Hindi, GermanSupported Gender: English, Japan, Chinese, India, Hindi, German| |passwordGenerator|1. digit / Number / false2. include / "all" or "string" or "number" or "symbol" / true|String|If you want get password Randomly, use sum passwordGenerator function.Password must be set at least 4 digits.Default return password value is only inludes String.If you want to inlude number or symbol or both in password,you can also set itCan Include: Number, Symbol|

VisualMethods

|Method|Parameter / Type / isOptional|ReturnType|Detail| |---|----|---|---| |colorGenerator|1. type / "rgb" or "code" / true |String|If you want to get Color randomly, use colorGenerator| |gradientGenerator|1. direction / "to right" or "to left" or "to top" or "to bottom"/ true |String|If you want to get gradient randomly, use gradientGenerator|