November's Paddleball Marathon
Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

This package has been deprecated

Author message:

Use Encapsule/arrcore

jbus-common-util

0.0.3 • Public • Published

Encapsule.io

jbus-common-util

JBUS

Summary

jbus-common-util contains a small collection of low-level JavaScript helper functions leveraged by the Encapsule/jbus-* modules.

Audience

None for this library alone: it's frankly quite trivial.

Licensing

jbus-common and all of its jbus-* dependencies are licensed under the terms of the GNU Affero General Public Licence (AGPL). Please consult the included LICENSE file for details.

AGPL-3.0

Runtime Install

To leverage the functions exported by jbus-common-util in your own Node.js project, install the package from npm and add it to your package.json's dependendencies section.

    npm install jbus-common-util --save

Package Build

Prerequisites

All JBUS modules presume per-user, or per-machine installations of the following runtimes and tools:

  • Node.js v4.1+
  • Grunt
  • Mocha

To build jbus-common-util from source code, clone the git repository, install the packages development dependencies, and then invoke the package's build script:

    git clone git@github.com:Encapsule/jbus-common-util
    cd jbus-common-util
    npm install
    grunt 

The build writes the JavaScript files in the ./lib directory. And, leverages webpack and uglify to update the package's ./index.js.

If you make no source changes, rebuilding the repo and checking git status should reveal that the build is idempotent.

Documentation

To leverage jbus-common-util in your Node.js project:

var jbus={}; jbus.common={}; jbus.common.util = require('jbus-common-util');
console.log("The current Epoch time is " + jbus.common.util.getEpochTime() + " seconds.");

jbus.common.util.__meta

Informational object containing package name, version, author, and license string properties.

jbus.common.util.deepCopy

var newCopy = jbus.common.util.deepCopy(existingResource);

Performs a deep copy of the memory resource referenced by required in-parameter.

jbus.common.util.clone

Alias for jbus.common.util.deepCopy.

jbus.common.util.dictionaryLength

var keys = jbus.common.util.dictionaryLength(reference);

Shorthand for Object.keys(reference).length

jbus.common.util.getEpochTime

var epochtime = jbus.common.util.getEpochTime();

Returns current Epoch time as an integer with unit seconds.

========================================================================== Encapsule.io Copyright (C) 2015 Encapsule.io, Bellevue WA USA

Keywords

install

npm i jbus-common-util

Downloadsweekly downloads

0

version

0.0.3

license

AGPL-3.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability