RaptorJS Utilities

3.2.0 · abandoned · verified Sun Apr 19

This library, `raptor-util`, is a collection of core utility functions designed for the RaptorJS framework, an end-to-end JavaScript toolkit initially developed by eBay for building adaptive modules and UI components. The package provides various common helpers, likely including object manipulation, type checking, and other foundational utilities to support the broader RaptorJS ecosystem. The current version is 3.2.0. However, the RaptorJS framework and its associated packages, including `raptor-util`, appear to be abandoned, with the last notable activity around 2017 and related npm packages last published around 2014-2015. It is no longer actively maintained or developed, making it unsuitable for new projects.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates importing `extend`, `isObject`, and `forEach` utilities using CommonJS `require` and showcases their basic usage for object merging, type checking, and iteration.

const { extend, isObject, forEach } = require('raptor-util');

// Example: Extending an object
const obj1 = { a: 1, b: 2 };
const obj2 = { b: 3, c: 4 };
const merged = extend({}, obj1, obj2);
console.log('Extended object:', merged); // Expected: { a: 1, b: 3, c: 4 }

// Example: Checking if a variable is an object
console.log('Is {}:', isObject({})); // Expected: true
console.log('Is null:', isObject(null)); // Expected: false

// Example: Iterating over an array or object
const items = ['apple', 'banana', 'cherry'];
console.log('Iterating over items:');
forEach(items, (item, index) => {
  console.log(`  ${index}: ${item}`);
});

const data = { name: 'Alice', age: 30 };
console.log('Iterating over data:');
forEach(data, (value, key) => {
  console.log(`  ${key}: ${value}`);
});

view raw JSON →