New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

recordarray

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

recordarray

Array Class Extension for Records

latest
Source
npmnpm
Version
0.0.14
Version published
Maintainers
1
Created
Source

RecordArray

Zero Dependency Extension of Javascript Array class with record data handling capabilities

Note: Further information on recordarray.js.ie or recordarray.com

Installation

npm install recordarray

CDN

https://unpkg.com/recordarray/src/RecordArray.js

Usage:

const RecordArray = require('recordarray');

const users = new RecordArray([
   {id: 1, name: 'Admin', type: 'admin'},
   {id: 2, name: 'Bob', type: 'guest'},
   {id: 3, name: 'Sam', type: 'guest'}
]);

console.log( 'User with ID 1 = ', users.findOneByID(1).name );
// Output: "Admin"

console.log( 'Guest Users Reverse Alphabetically = ', users
   .findBy('type', 'guest')
   .sortBy('name','DESC')
   .listValues('name')
   .join(', ')
);
// Output: "Sam, Bob"

class methods

  • compare
  • compareRecords

compare

compareRecords

object methods

As this class extends the base Array class it inherits all methods from that class, but may need these alternatives to work with an array of records via their fields.

Retrieval methods

Record Retrieval

  • findBy
  • findByID
  • findByTag
  • findOne
  • findOneByID
  • findOneByTag
  • matchBy
  • matchByID
  • matchByTag
  • unique
  • uniqueBy
  • clone
  • toArray
  • listValues
  • getName
  • getNameByTag
  • indexBy
  • indexByID
  • indexByTag

Mutation methods

  • sortBy
  • sortASC
  • sortDESC
  • extend
  • merge

CRUD methods

  • create
  • read
  • update
  • delete
  • list

Keywords

recordarray

FAQs

Package last updated on 25 May 2025

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