Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@dashkite/bake
Advanced tools
Universal JavaScript Encoding Transformations Toolkit
"bake" (pronounced "bah-keh") is the romaji representation of a Japanese word meaning "change" or "tranform". This name is also a playful reference to mojibake, describing character encoding failures that result in unintended transformations.
npm i @dashkite/bake
bake
is designed around standard JavaScript interfaces, so you can use it freely in the browser or Node.js environments. And while DashKite writes with CoffeeScript, and that's what you'll see in examples, bake
is published as transpiled JavaScript.
import { convert } from "@dashkite/bake"
string = "I choose to see the beauty."
message = convert from: "utf8", to: "base64", string
# mesage is as follows
# SSBjaG9vc2UgdG8gc2VlIHRoZSBiZWF1dHku
convert (specification, data) -> transformedData
convert
accepts a specification
and some data
to work with. It will read the from
and to
properties of the specification
and output transformedData
for you, if it knows how.
The specification
is an obect with the properties:
from
: The starting format of data
to
: The desired format of transformedData
base64url
/ safe-base64
is based on RFC 4648's "base64url" mapping.base36
is less common than base64 and base16, but it's a useful format. Like base64
, this format has the advantage of compact expression, but base36
is always URL-safe and uses only lower-case, making it attractive for identifiers.bytes
refers to an instance of Uint8Array
json
refers to JSON string encoding as applied to UTF8 strings. Do not use this to generally stringify data structures.uri
refers to encodeURI
as appied to UTF8 strings.FAQs
Universal JavaScript Encoding Transformations Toolkit
We found that @dashkite/bake demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.