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

onyx-helper

v1.0.1

Published

Extremely light and powerful library work for client and node as one. A gemstone at your js project. ES6/ES7 Javascript wrapping global objects and functionality also handling with async tasks.

Downloads

3

Readme

Welcome to ES7 Javascript Util Helper Onyx. A Gemstone In Your Project!

Awesome Open Source Love

Donation

To keep the repo live and kicking with good quality code we would more than happy if you could buy us a cup of coffe ;)

Gittip

Motivation

Hey guys, I started to write this repo from the reason that we over and over writing the same utils, and using libraries that have their own utils and it make kinda overkill in script size download. So we created the ES7 Javascript util helper. Extremely light and powerful library work for client and node js as one. A gemstoen at your js project ;) this one will be Onyx :).

Installation

The easiest way to get started is to clone the repository:

# Install util helper from npm registrey
npm install --save onyx-helper

# Get the latest snapshot
git clone --depth=1 https://github.com/sayeko/es7-javascript-util-helper.git myproject

# Change directory
cd myproject

# Install NPM dependencies
npm install

# Install gulp globally
npm i gulp -g

# Then simply start your app with the automation tool gulp
gulp

Usage Famous Is Methods

['Arguments', 'Function', 'String', 'Number', 'Object', 'Date', 'Error', 'Symbol', 'Undefined', 'HTMLDivElement', 'Array', 'Null'];

# Dynamic (is) function

// Valid function.
let fn = ()=> {return 'Test'};

let flag = Onyx.isFunction(fn); // return true;

Usage Parse

let test = Onyx.safeParseJSON(undefined, {}); // return {};

Parse safe string to int

let num = Onyx.safeStringToInt('3', null); // Enter valid string to parse if there parsing error the function will return the default value.


<h5>Every developer in js encounter in the problem how to create clone of complex js object.</h5>

```bash
# Clone js object.

Onyx.clone(obj);

Window Facade

# Redirect

Onyx.redirect(url); // The name is kinda explanatory.

# Query string from url

Onyx.getQueryParametersByString(queryString..) // Get the query string as object.

# Refresh page (reload)

Onyx.reload();

# Fullscreen facades multi platform function works on any browser.

Onyx.fullScreen() // Kick in and change the user mode.

Onyx.isFullScreen() // Tell if the user is already in fullscreen mode. the fn above use this fn.

# Hostname domain

Onyx.hostname(); // google... etc..

# Protocol

Onyx.protocol(); // http, https, ftp , etc..

Async


# Load async script

Onyx.loadAsyncScript('src..' ,id , type); // Load async way script and append it to the end of the body tag, return Promise.

# Load async image

Onyx.loadAsyncImage(path, defaultPath) // Trying to load the path and if the path is not exist or error to load we loading the default path instead.

Contributors

Everyone is more than welcome to fork this repo upload issue or email me to make a suggestions. If you have cool and light facades please make a pull request. and help us to help the js developer community.

License

MIT Licence