Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vega-util

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vega-util

JavaScript utilities for Vega.

  • 1.6.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
241K
increased by3.32%
Maintainers
1
Weekly downloads
 
Created

What is vega-util?

The vega-util npm package provides utility functions for Vega, a visualization grammar. These utilities include functions for data manipulation, type checking, and other common operations needed when working with Vega visualizations.

What are vega-util's main functionalities?

Type Checking

Vega-util provides functions to check the type of a variable, such as isArray, isObject, and isString.

const vegaUtil = require('vega-util');

console.log(vegaUtil.isArray([1, 2, 3])); // true
console.log(vegaUtil.isObject({a: 1})); // true
console.log(vegaUtil.isString('hello')); // true

String Manipulation

Vega-util includes functions for string manipulation, such as pad and truncate.

const vegaUtil = require('vega-util');

console.log(vegaUtil.pad('test', 10)); // 'test      '
console.log(vegaUtil.truncate('This is a long string', 10)); // 'This is a…'

Data Manipulation

Vega-util provides functions for data manipulation, such as array conversion and object extension.

const vegaUtil = require('vega-util');

const data = [1, 2, 3, 4, 5];
console.log(vegaUtil.array(data)); // [1, 2, 3, 4, 5]
console.log(vegaUtil.extend({}, {a: 1}, {b: 2})); // {a: 1, b: 2}

Other packages similar to vega-util

Keywords

FAQs

Package last updated on 28 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc