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

dojo-core

v2.0.0-alpha.19

Published

Basic utilites for common TypeScript development

Downloads

37

Readme

Dojo 2 core

Build Status codecov.io npm version

This package provides a set of language helpers, utility functions, and classes for writing TypeScript applications. It includes APIs for feature detection, asynchronous operations, basic event handling, and making HTTP requests.

WARNING This is beta software. While we do not anticipate significant changes to the API at this stage, we may feel the need to do so. This is not yet production ready, so you should use at your own risk.

Installation

This package is currently in Beta with a initial stable release scheduled for later this year. You can download the Beta by cloning or downloading this repository.

Usage

TypeScript

To access modules use after cloning or downloading the repository, you can reference it by:

import * as lang from 'src/lang'; // this imports all exports of the module as the object lang

import { lateBind, mixin } from 'src/lang'; // this imports lateBind and mixin from the module

Compile To JavaScript

Once downloaded, you can compile the TypesScript files by first installing the project dependencies with:

npm install

The by running this command:

grunt dev

This will run the grunt 'dev' task.

Features

Feature Detection

Using the latest Web technologies isn't always as straightforward as developers would like due to differing support across platforms. dojo-core/has provides a simple feature detection API that makes it easy to detect which platforms support which features.

Language Utilities

The core package provides modules offering language utilities. Some of these are heavily based on methods in the ES2015 proposal; others are additional APIs for commonly-performed tasks.

array

The dojo-core/array module contains analogues to some of the ES2015 Array APIs.

lang

The dojo-core/lang module contains various utility functions for tasks such as copying objects and creating late-bound or partially applied functions.

math

The dojo-core/math module contains analogues to a number of ES2015 APIs, including many trigonometric and logarithmic functions.

string

The dojo-core/stringExtras module contains various string functions that are not available as part of the ES2015 String APIs.

UrlSearchParams

The dojo-core/UrlSearchParams class can be used to parse and generate URL query strings.

Event handling

The dojo-core/on module contains methods to handle events across types of listeners. It also includes methods to handle different event use cases including only firing once and pauseable events.

HTTP requests

The dojo-core/request module contains methods to simplify making http requests. It can handle making requests in both node and the browser through the same methods.

Promises and Asynchronous Operations

Promise

The dojo-core/Promise class is an implementation of the ES2015 Promise API that also includes static state inspection and a finally method for cleanup actions.

dojo-core/async contains a number of classes and utility modules to simplify working with asynchronous operations.

Task

The dojo-core/async/Task class is an extension of dojo-core/Promise that provides cancelation support.

How do I contribute?

We appreciate your interest! Please see the Dojo 2 Meta Repository for the Contributing Guidelines and Style Guide.

Dojo core's continuous integration tests use the BrowserStack cloud.

BrowserStack

Licensing information

© 2004–2016 Dojo Foundation & contributors. New BSD license.

Some string functions (codePointAt, fromCodePoint, and repeat) adopted from polyfills by Mathias Bynens, under the MIT license.

See LICENSE for details.