
Product
Announcing Precomputed Reachability Analysis in Socket
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
= CSVobj
== Aims
CSVobj has two simple aims in the processing of CSV files:
It achieves these aims by automatically instantiating a class with dynamic attributes that can be used to refer to each column of the CSV by name. Each attribute name is derived in a predictable fashion from the column headers (the first row of the CSV).
=== Clarity
Rather than referring programatically to the "third element of the row" ("row[2]") one can simply say "row.last_name".
=== Robustness
Any change to the CSV format (eg by inserting a new column between two existing columns) will not require a program change: you do not need to hunt down all references to "row[2]" and make them "row[3]"; they remain "row.last_name".
== Example
Given the following CSV file:
First Name,Last Name
Cheryl,James
Sandra,Denton
Deidra,Roper
we can extract just the last names as follows:
# Get the gem
require 'rubygems'
require 'csvobj'
# Subclass because #parse defines methods on the class
class MyCsv < CSVobj ; end
# First command line argument is CSV file to read
csv_file = File.new( ARGV[0] )
# Parse the file, print the "last name" column of each row
MyCsv.parse(csv_file).each do |row|
puts row.last_name
end
FAQs
Unknown package
We found that csvobj demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.