UNPKG

d3-let

Version:

A small set of utilities for d3 plugins

28 lines (15 loc) 1.03 kB
# d3-let [![NPM](https://badge.fury.io/js/d3-let.svg)](https://www.npmjs.com/package/d3-let) [![CircleCI](https://circleci.com/gh/quantmind/d3-let.svg?style=svg)](https://circleci.com/gh/quantmind/d3-let) [![devDependency Status](https://david-dm.org/quantmind/d3-let/dev-status.svg)](https://david-dm.org/quantmind/d3-let#info=devDependencies) Utilities for every day use. No dependencies, import what you need, if you need it. ## Installing If you use [NPM](https://www.npmjs.com/package/d3-let), ``npm install d3-let``. Otherwise, download the latest release. AMD, CommonJS, and vanilla environments are supported. In vanilla, a ``d3`` global is exported. You can also load directly from [unpkg](https://unpkg.com/d3-let/). Try [d3-let](https://runkit.com/npm/d3-let) in your browser. ## API ### inBrowser Constant indicating if the javascript is client side (in the browser) or server side (node). ### resolvedPromise (result) Return a resolved or rejected promise. The promise is rejected if ``result`` is an Error.