Registry / raptor-util

raptor-util

JSON →
library3.2.0jsnpmunverified

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.

npm install raptor-util
INSTALL
IMPORT
SIG · RAPTOR-UTIL
R
raptor-util
javascriptv3.2.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

extend
const { extend } = require('raptor-util');
import { extend } from 'raptor-util';
This package primarily targets CommonJS environments. While ES Modules syntax might be attempted, it will likely fail or require bundler/transpiler configuration for compatibility.
isObject
const { isObject } = require('raptor-util');
const isObject = require('raptor-util').isObject;
Named exports are the typical pattern for this library. Attempting to destructure directly from `require` is the idiomatic CommonJS approach.
forEach
const { forEach } = require('raptor-util');
import forEach from 'raptor-util';
There is no default export. Individual utility functions are exported as named members of the module.

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}`); });
Debug
Known issues
breakingThe `raptor-util` package and the broader RaptorJS framework are abandoned. The last activity on the GitHub repository was in 2017, and related npm packages were last published in 2014-2015. It is not maintained and may contain unpatched vulnerabilities or incompatibilities with modern JavaScript runtimes.
fix
Avoid using `raptor-util` for new projects. Consider modern, actively maintained utility libraries like Lodash, Ramda, or even native browser/Node.js APIs which have evolved significantly since this package's last update.
affects: >=3.0.0
gotcha`raptor-util` was developed primarily for CommonJS environments (Node.js versions prevalent before 2017). Using it in modern ESM-only projects or environments without proper transpilation/bundling can lead to 'require is not defined' errors or other module resolution failures.
fix
If absolutely necessary to use in a modern project, configure your bundler (e.g., Webpack, Rollup, Parcel) to handle CommonJS modules or use a CommonJS compatible Node.js environment. For browser usage, ensure it's bundled and polyfilled appropriately.
affects: >=3.0.0
gotchaThis library does not ship with TypeScript type definitions. Using it in a TypeScript project will require manually creating declaration files (e.g., `raptor-util.d.ts`) to provide type safety and avoid compiler errors.
fix
Create a `declarations.d.ts` file or similar in your project with `declare module 'raptor-util';` or more specific declarations for the functions you use. For example: `declare module 'raptor-util' { export function extend(...args: any[]): any; export function isObject(value: any): boolean; export function forEach(collection: any, iteratee: Function): void; }`
affects: >=3.0.0
Errors
Common errors & fixes
ReferenceError: require is not defined
Attempting to use `require()` in an ECMAScript Module (ESM) context (e.g., in a `.mjs` file or when `"type": "module"` is set in `package.json`).
fix
This package is designed for CommonJS. You either need to run your code in a CommonJS environment or configure a bundler to handle CommonJS modules within an ESM project. Direct ESM `import` statements for `raptor-util` are unlikely to work without extensive build tooling.
TypeError: Cannot destructure property 'someFunction' of require(...) as it is undefined.
Attempting to import a function that does not exist or has a different name than expected from the `raptor-util` module.
fix
Double-check the exact export names of the utility functions you intend to use. Without official documentation, this may require inspecting the package's source code if you truly need to use it. Many common utility functions have standard names, but this package's specific exports are not publicly documented.
Upgrade
Version history
3.2.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
raptor-util — npm install raptor-util · libregistry