Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Readme
JavaScript implementation of CPIM "Common Presence and Instant Messaging" (RFC 3862).
Suitable for parsing and generating CPIM messages, allowing access to CPIM headers and the MIME component (via the mimemessage library) of messages such as:
From: Iñaki Baz Castillo <im:inaki.baz@eface2face.com>
To: Alice <sip:alice@atlanta.com>
Subject: Wines tonight!
DateTime: 2015-06-25T11:30:00-08:00
Content-type: text/plain; charset=utf-8
Hi Alice, tonight wines at home
$ npm install cpim --save
And then:
var cpim = require('cpim');
The browserified version of the library at dist/cpim.js
exposes the global window.cpim
module.
<script type='text/javascript' src='js/cpim.js'></script>
Let's build a CPIM message to invite Alice to our party.
var cpim = require('cpim');
var message, mime;
mime = cpim.mimemessage.factory({
contentType: 'text/html',
body: '<h1>Party tonight?</h1>'
});
message = cpim.factory({
from: 'Iñaki Baz Castillo <im:ibc@aliax.net>',
to: 'Alice <im:alice@atlanta.com>',
subject: 'Hi!',
mime: mime
});
By calling message.toString()
it produces the following CPIM formatted string:
From: Iñaki Baz Castillo <im:ibc@aliax.net>
To: Alice <im:alice@atlanta.com>
DateTime: 2015-08-11T12:05:43.569Z
Content-Type: text/html
<h1>Party tonight?</h1>
You can read the full API documentation in the docs folder.
The library includes the Node debug module. In order to enable debugging:
In Node set the DEBUG=cpim*
environment variable before running the application, or set it at the top of the script:
process.env.DEBUG = 'cpim*';
You may prefer to also enable MIME debug:
process.env.DEBUG = 'cpim* mimemessage*';
In the browser run cpim.debug.enable('cpim*');
and reload the page. Note that the debugging settings are stored into the browser LocalStorage. To disable it run cpim.debug.disable('cpim*');
.
Iñaki Baz Castillo at eFace2Face, inc.
MIT :)
FAQs
JavaScript implementation of CPIM "Common Presence and Instant Messaging" (RFC 3862)
The npm package cpim receives a total of 15 weekly downloads. As such, cpim popularity was classified as not popular.
We found that cpim 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.