Giter VIP home page Giter VIP logo

libdata's Introduction

@ngnjs/libdata

While this JavaScript library is maintained primarily by and for NGN, it is a standalone "cross-runtime" library (will work without NGN).

The library consists of common functions for managing primitive and low level elements of JavaScript (objects, arrays, booleans, etc).

Usage

See the working examples on Codepen.

Via CDN (Browser/Deno)

import * as DATA from 'https://cdn.skypack.dev/@ngnjs/libdata'

console.log(DATA)

Also available on JSDelivr.

Node

npm i @ngnjs/libdata -S

import * as DATA from '@ngnjs/libdata'
console.log(DATA)

Features

The NGN libdata library is a standalone library containing common data manipulation functions. This is significantly more primitive than the NGN Data module. This library contains methods for performing operations to a single data item, whereas the NGN Data module focuses on data modeling, bulk storage, and querying (amongst others).

Constants

NameDescription
dedupeDeduplicate an array.
forceArrayForce a value into an array.
forceBooleanForce a value into a boolean.
forceNumberForce a value into a number.
forceStringForce a value into a string.
objectA collection of object management methods, including all, any, exactly, require, extraneous, missing, mixin, serialize
typeOfReturns the data type of a value. This is more specific than the native `typeof` operator.
nullIfReturns null if the source value matches the provided value.
coalesceReturns the first non-null/defined value in a list of arguments.
coalescebSame as coalesce, but ignores blank/empty strings.
getPrimitiveReturns the primitive object/function of the specified type.
AdvancedSetThis is a Set, augmented with additonal methods: isSuperSet, concat, intersection, except, diff, and equal
GUIDGenerate a globally unique identifier.
UUIDGenerate a universally unique identifier.
NANOIDA very fast/efficient unique ID generator.
checksumCalculate the checksum of an object.

libdata's People

Contributors

coreybutler avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.