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 🙏

© 2025 – Pkg Stats / Ryan Hefner

datypes

v1.3.1

Published

Global Javascript Extended Types

Readme

Da Daaam (Global Javascript Extended Types)

I don't even know, are there packages better

Just wanted to write mine, own

Soooo..

Check Last Update

Types

  • $object
  • $Array
  • $string
  • $number

I gave them some methods which I use too often

Installation

npm install datypes

Or

yarn add datypes

Get Started

First we have to initialize global function $

You have to run this function in your main file only once

import initTypes from "datypes"

initTypes()

Now We can define variables

Let's do

const person = $({
  name: "Dann",
  age: 18,
  hobbies: $(["_", "_"]),
})

So what can we actually do?

person.$empty() // false
person.$forEach((value, key) => console.log(`${key} : `, value))
const cloneWithoutRefs = person.$clone()
person.$hasSome("age", "hobbies", "girlfriend") // true
person.$hasAll("age", "hobbies", "girlfriend") // false

person.hobbies.remove(0) // ["_"] removes it's element
person.hobbies.log() // logs value

Types now are global

let age: $number
let person: $object<MyInterface>

Also array method .readonly()

const arr = $([1, 2, 3]) // type - number[]
const readonlyArr = arr.readonly() // type - readonly number[]

$ArrayLength

const numbers = $.$ArrayLength(5, (i) => i) // [0, 1, 2, 3, 4]

const randomDigits = $.$ArrayLength(4, () => $.randomNumber(0, 9)) // [4, 6, 7, 1]

Changelog

v1.3.0

  • Removed static methodes from $number, $string, $object and $Array
  • Added new static methods for global function $
    • is$number (whether or not value is an instance of $number)
    • is$string (whether or not value is an instance of $string)
    • is$object (whether or not value is an instance of $object)
    • is$Array (whether or not value is an instance of $Array)
    • randomNumber (returns random number between a range)
    • $ArrayLength (returns an $Array with spec. length by custom map)

v1.2.3

  • New methods for Arrays (includesAny, includesAll, compute)
  • New methods for Strings (includesAny, includesAll, capitalizeFirst)

It's not All!

Install and check yourself!