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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@leapond/utilities

v0.0.3

Published

A set of JavaScript utilities for on-demand using.

Downloads

3

Readme

Leapond utilities

A set of JavaScript utilities for on-demand using.

Install

# npm
npm i @leapond/utilities
# yarn
yarn add @leapond/utilities

Usage

Development

// on-demand import
import {log, isEmptyPlainObjectStrict} from "@leappond/utilites/src/common";
import deepMerge from "@leapond/utilities/src/deepMerge";
// it will include whole Leapond Utilities
import {log, isObject, deepMerege} from "@leappond/utilites";

Browser

<!-- Legacy -->
<script src="./utilities-bundle.iife.babel.prod.min.js"></script>
<script>
    lpU.log('batch merge', lpU.deepMerge.batch(
            [
                {a: 1, c: [1, 2, 3], d: new Map([[1, {x: 1, z: 3}]])},
                null,
                {b: 2},
                3,
                {c: [2, 3, 4]},
                {d: new Map([[1, {x: 10, y: 2}]])}
            ],
            {arrayPolicy: deepMerge.ARRAY_CONCAT_UNIQ}
    ))
</script>
<!-- Module -->
<script type="module">
    import * as lpU from "./utilities-bundle.es.js";

    lpU.log('batch merge', lpU.deepMerge.batch(
            [
                {a: 1, c: [1, 2, 3], d: new Map([[1, {x: 1, z: 3}]])},
                null,
                {b: 2},
                3,
                {c: [2, 3, 4]},
                {d: new Map([[1, {x: 10, y: 2}]])}
            ],
            {arrayPolicy: deepMerge.ARRAY_CONCAT_UNIQ}
    ))
</script>

Document

deepCopy(target, depthMax)

/**
 * Merge Options
 *
 * {boolean|number} [clone=-Infinity] - if clone target. <br/>> true for all, false for none, <br/>> number<0 for reuse depth, number>0 for clone depth
 * {boolean} [unEnumerableInclude=false] - if include keys not enumerable(and Symbol keys)
 * {arrayMergePolicies} [arrayPolicy=ARRAY_NORMAL] - array merge policy of build-in
 * {function} [arrayMerge] - custom array merger, (a, b) => result
 * {boolean} [deepMap=true] - if dig in Map items
 */
/**
 * Array Merge Policies
 *
 * ARRAY_NORMAL - write by deepMerge
 * ARRAY_NORMAL_FIXED - existed item will be readonly, but can increase new item
 * ARRAY_CONCAT - concat to target array
 * ARRAY_CONCAT_UNIQ - concat to target array, but skip existed item
 * ARRAY_REPLACE - replace whole array
 * ARRAY_SEAL - fixed length
 * ARRAY_FREEZE - ignore source
 */
deepMerge(target, source, options)
deepMerge.batch(aTargets, options)

// patched @nx-js/observer-util
observe({}, {scheduler:1})
// patched @nx-js/observer-util
const o = observable({x: 0})
observe(() => console.log('changed:', o.x), {
  scheduler(ok, op) {
    if (op.value > 100) ok(); else console.warn('o.x must large than 100!')
  }
})
o.x = 99
o.x = 2021

Refer to the JSDoc/comments in code.

Exported items:

  1. log
  2. warn
  3. error
  4. info
  5. deepCopy
  6. deepMerge
  7. getMergeType
  8. isArray
  9. isEmpty
  10. isEmptyArray
  11. isEmptyObject
  12. isEmptyPlain
  13. isEmptyPlainObject
  14. isEmptyPlainObjectStrict
  15. isMap
  16. isObject
  17. isObservable
  18. isPlainObject
  19. isSet
  20. isWeakMap
  21. isWeakSet
  22. noop
  23. observable
  24. observe
  25. raw
  26. sObject
  27. ssArray
  28. ssMap
  29. ssObject
  30. ssSet
  31. ssSymbol
  32. ssWeakMap
  33. ssWeakSet
  34. toStr
  35. u
  36. unobserve
  37. version