
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@internetarchive/field-parsers
Advanced tools
Parsers to convert strings from Internet Archive API responses to their native javascript equivalents.
Each parser implements the FieldParserInterface
:
export type FieldParserRawValue = string | number | boolean;
export interface FieldParserInterface<T> {
/**
* Parse the raw value and return a value of type T or undefined if unparseable
*
* @param rawValue T | undefined
*/
parseValue(rawValue: FieldParserRawValue): T | undefined;
}
They are responsible for parsing the input and returning the appropriate value or undefined
.
Instantiate a parser or use the shared instance:
const parser = new BooleanParser()
parser.parse('true') => true
BooleanParser.shared.parse('false') => false
See tests for more usage examples.
Boolean
Byte
- a number in bytesDate
- parses the various Internet Archive date formatsDuration
- Parses hh:mm:ss.ms
and ss.ms
formats to secondsMediaType
- Internet Archive media typesNumber
PageProgression
- Internet Archive page progression (right to left, left to right)String
To run the suite of Web Test Runner tests, run
yarn run test
To run the tests in watch mode (for <abbr title="test driven development">TDD</abbr>, for example), run
yarn run test:watch
To scan the project for linting errors, run
yarn run lint
You can lint with ESLint and Prettier individually as well
yarn run lint:eslint
yarn run lint:prettier
To automatically fix many linting errors, run
yarn run format
You can format using ESLint and Prettier individually as well
yarn run format:eslint
yarn run format:prettier
For most of the tools, the configuration is in the package.json
to reduce the amount of files in your project.
If you customize the configuration a lot, you can consider moving them to individual files.
FAQs
Field parsers for Internet Archive metadata fields.
The npm package @internetarchive/field-parsers receives a total of 204 weekly downloads. As such, @internetarchive/field-parsers popularity was classified as not popular.
We found that @internetarchive/field-parsers demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 15 open source maintainers 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.