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.
XRB is a templating system, and these formatters assist with the development of typical view and form based web interface. A formatter is a high-level adapter that turns model data into presentation text.
Formatters are designed to be customised, typically per-project, for specific formatting needs.
XRB::Formatters
was a library extracted from Financier, an small business management app, itself, derived from an old Rails app. I was a bit envious of form_for
in terms of the ease of generating forms, but found that it wasn't very extendable. I also found myself generating code to format model data as rich HTML. XRB::Formatters
attempts to be an easily extendable formatting module which can generate rich text, links and HTML.
Add this line to your application's Gemfile:
gem 'xrb-formatters'
And then execute:
$ bundle
Or install it yourself as:
$ gem install xrb-formatters
The most basic usage involves converting model data into presentation text by a mapping corresponding to the objects type:
formatter = XRB::Formatters::Formatter.new
formatter.for(String) do |value, **options|
"String: #{value}"
end
expect(formatter.format("foobar")).to be == "String: foobar"
For more examples please see spec/
.
We welcome contributions to this project.
git checkout -b my-new-feature
).git commit -am 'Add some feature'
).git push origin my-new-feature
).This project uses the Developer Certificate of Origin. All contributors to this project must agree to this document to have their contributions accepted.
This project is governed by the Contributor Covenant. All contributors and participants agree to abide by its terms.
FAQs
Unknown package
We found that xrb-formatters demonstrated a healthy version release cadence and project activity because the last version was released less than 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.