• This repository has been archived on 30/Jul/2018
  • Stars
    star
    213
  • Rank 185,410 (Top 4 %)
  • Language
    TypeScript
  • License
    Other
  • Created over 9 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🚀 Dojo 2 - language helpers and utilities.

The @dojo/core repository has been deprecated and merged into @dojo/framework

You can read more about this change on our blog. We will continue providing patches for core and other Dojo 2 repositories, and a CLI migration tool is available to aid in migrating projects from v2 to v3.


Dojo 2 core

Build Status codecov.io npm version FOSSA Status

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.

Usage

To use @dojo/core, install the package along with its required peer dependencies:

npm install @dojo/core

# peer dependencies
npm install @dojo/has
npm install @dojo/shim

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.

lang

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

load

The @dojo/core/load module can be used to dynamically load modules or other arbitrary resources via plugins.

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.

Code Style

This repository uses prettier for code styling rules and formatting. A pre-commit hook is installed automatically and configured to run prettier against all staged files as per the configuration in the project's package.json.

An additional npm script to run prettier (with write set to true) against all src and test project files is available by running:

npm run prettier

Installation

To start working with this package, clone the repository and run npm install.

In order to build the project run grunt dev or grunt dist.

Testing

Test cases MUST be written using Intern using the Object test interface and Assert assertion interface.

90% branch coverage MUST be provided for all code submitted to this repository, as reported by istanbul’s combined coverage results for all supported platforms.

To test locally in node run:

grunt test

To test against browsers with a local selenium server run:

grunt test:local

To test against BrowserStack or Sauce Labs run:

grunt test:browserstack

or

grunt test:saucelabs

Licensing information

© 2004–2018 JS 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.

FOSSA Status

More Repositories

1

dojo

Dojo 1 - the Dojo 1 toolkit core library.
JavaScript
1,534
star
2

framework

Dojo Framework. A Progressive Framework for Modern Web Apps
TypeScript
572
star
3

dojo-oldmirror

Dojo 1 - the official read-only mirror of Dojo Core. Please submit patches at http://bugs.dojotoolkit.org/
JavaScript
359
star
4

meta

🚀 Dojo - meta information for the project.
226
star
5

dijit

Dojo 1 - UI library
HTML
174
star
6

dojox

Dojo 1 - extras library. Please submit bugs to https://bugs.dojotoolkit.org/
JavaScript
148
star
7

intern-only-dojo

DEPRECATED - See dojo/meta for the latest on Dojo 2
TypeScript
122
star
8

dojox-oldmirror

Dojo 1 - the official read-only mirror of DojoX. Please submit patches at http://bugs.dojotoolkit.org/
JavaScript
108
star
9

dijit-oldmirror

Dojo 1 - the official read-only mirror of Dijit. Please submit patches at http://bugs.dojotoolkit.org/
JavaScript
97
star
10

docs

Dojo 1 - reference Documentation.
JavaScript
92
star
11

widgets

🚀 Dojo - UI widgets.
TypeScript
86
star
12

examples

🚀 Dojo - example applications.
TypeScript
77
star
13

demos

Dojo 1 - toolkit demos. Please submit bugs to https://bugs.dojotoolkit.org/
JavaScript
76
star
14

util

Dojo 1 - build utilities. Please submit bugs to https://bugs.dojotoolkit.org/
JavaScript
60
star
15

dwb

Dojo 1 - the Dojo Web Builder.
JavaScript
57
star
16

demos-oldmirror

Dojo 1 - the official read-only mirror of Dojo Demos. Please submit patches at http://bugs.dojotoolkit.org/
JavaScript
38
star
17

util-oldmirror

Dojo 1 - the official read-only mirror of Dojo Util. Please submit patches at http://bugs.dojotoolkit.org/
JavaScript
37
star
18

widget-core

🚀 Dojo 2 - widget authoring system.
TypeScript
34
star
19

dijit-themes

Dojo 1 - modern themes
CSS
29
star
20

typings

Dojo 1 - TypeScript Typings (including Dijit and DojoX)
TypeScript
28
star
21

cli

🚀 Dojo - command line tooling.
TypeScript
25
star
22

dojo.io

Dojo - source for the dojo.io website
TypeScript
17
star
23

loader

🚀 Dojo 2 - AMD loader.
TypeScript
15
star
24

routing

🚀 Dojo 2 - routing library.
TypeScript
14
star
25

shim

🚀 Dojo 2 - provides modular fills of ES6+ functionality.
TypeScript
14
star
26

cli-create-app

🚀 Dojo - cli command for creating app boilerplates.
TypeScript
12
star
27

dom

**DEPRECATED** Dojo 2 - DOM utilities.
TypeScript
12
star
28

dapi

Dojo 1 - API viewer.
CSS
11
star
29

themes

Dojo Framework Themes
CSS
11
star
30

gfx

Dojo 1 - AMD-based Graphics Toolkit.
JavaScript
9
star
31

cli-build-app

Command for building Dojo applications
TypeScript
9
star
32

compose

**DEPRECATED** Dojo 2 - composition library.
TypeScript
8
star
33

app

🚀 Dojo 2 - an application framework.
TypeScript
8
star
34

dgauges

Dojo 1 - gauges Framework.
JavaScript
8
star
35

crypto

🚀 Dojo 2 - cryptography utilities.
JavaScript
7
star
36

dgrid

🚀 Dojo 2 - reactive, extensible grid widget.
TypeScript
7
star
37

dojo-website

Dojo 1 - website for Dojo Toolkit 1.x to 2.x transition.
JavaScript
6
star
38

dojo-package-template

Dojo 2 - template to clone for creating packages (internal use)
TypeScript
6
star
39

i18n

🚀 Dojo 2 - internationalization library.
TypeScript
6
star
40

cli-build-widget

Command for building Dojo widgets
TypeScript
6
star
41

site

Documentation site for https://github.com/dojo/framework
TypeScript
6
star
42

stores

🚀 Dojo 2 - data stores.
TypeScript
5
star
43

actions

🚀 Dojo 2 - a command library.
TypeScript
5
star
44

grunt-dojo2

Dojo 2 - Grunt tasks and configuration (internal use)
TypeScript
4
star
45

cli-build-webpack

🚀 **DEPRECATED** Dojo 2 - cli command for building applications
TypeScript
4
star
46

streams

🚀 Dojo 2 - WHATWG compliant streams.
TypeScript
4
star
47

parser

🚀 Dojo 2 - library for declaratively instantiating widgets.
TypeScript
3
star
48

tools

Additional tools and utilities for use with dojo/framework
TypeScript
3
star
49

web-editor

🚀 Making it easy to explore Dojo 2 in a browser
TypeScript
3
star
50

parade

TypeScript
3
star
51

dojo-codesandbox-template

The https://codesandbox.io template for Dojo
TypeScript
3
star
52

webpack-contrib

Plugins and loaders for webpack used with Dojo
TypeScript
3
star
53

has

🚀 Dojo 2 - feature detection library.
TypeScript
3
star
54

cli-test-intern

🚀 Dojo - cli command for testing applications
TypeScript
2
star
55

cli-create-theme

This package provides tooling support for theme generation in Dojo.
TypeScript
2
star
56

dataviz

🚀 Dojo 2 - data vizualization package.
TypeScript
1
star
57

cli-create-widget

Dojo - cli command for creating widgets boilerplate.
TypeScript
1
star
58

labs

Early access to future and experimental Dojo features
TypeScript
1
star
59

scripts

TypeScript
1
star
60

interop

Provides bindings and interoperability between Dojo packages and other libraries
TypeScript
1
star
61

interfaces

🚀 Dojo 2 - common interfaces and types.
TypeScript
1
star