Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
content-state
Advanced tools
This is the custom Error class we're assuming we'll throw on parse errors.
Object
Given a contentState annotation, add back in the context if it's missing. Given a mimimal target-only contentState, assume that it's a target and wrap it in the annotation.
Given an annotation, confirm that it has the correct context and that it has a target property. Will throw errors if it is not.
Boolean
Inspect the motivation of an annotation and see if it contains the "contentState" motivation.
string
Helper function to create a full link that includes the annotation param.
Object
Extract the annotation information from a full URL
Object
Given a contentState annotation, add back in the context if it's missing. Given a mimimal target-only contentState, assume that it's a target and wrap it in the annotation.
Kind: global function
Returns: Object
- the annotation with any transformations applied
Param | Type | Description |
---|---|---|
annotation | Object | the annotation to expand |
Given an annotation, confirm that it has the correct context and that it has a target property. Will throw errors if it is not.
Kind: global function
Param | Type | Description |
---|---|---|
annotation | Object | the annotation to expand |
Boolean
Inspect the motivation of an annotation and see if it contains the "contentState" motivation.
Kind: global function
Returns: Boolean
- true if it's a contentState Annotation, false if not.
Param | Type | Description |
---|---|---|
annotation | Object | the annotation to inspect |
string
Helper function to create a full link that includes the annotation param.
Kind: global function
Returns: string
- The augmented URL
Param | Type | Description |
---|---|---|
url | string | The URL that should have a contentState param added. |
annotation | Object | The annotation Object |
Object
Extract the annotation information from a full URL
Kind: global function
Returns: Object
- The annotation data and manifest value
Param | Type | Description |
---|---|---|
url | String | The URL to parse |
FAQs
A library for working with IIIF Content State annotations
The npm package content-state receives a total of 2 weekly downloads. As such, content-state popularity was classified as not popular.
We found that content-state 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.