Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cnd

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cnd - npm Package Compare versions

Comparing version 2.0.2 to 2.1.0

lib/XJSON.js

4

lib/BITSNPIECES.js

@@ -14,4 +14,2 @@ // Generated by CoffeeScript 1.9.3

this.test = require('./test');
njs_util = require('util');

@@ -27,3 +25,3 @@

/* TAINT `assert.deepEqual` is broken as of https://github.com/joyent/node/issues/7161 */
/* `assert.deepEqual` is broken as of https://github.com/joyent/node/issues/7161 */
if (!((arity = P.length) > 1)) {

@@ -30,0 +28,0 @@ throw new Error("expected at least 2 arguments, got " + arity);

@@ -21,3 +21,3 @@ // Generated by CoffeeScript 1.9.3

routes = ['./TRM', './BITSNPIECES', './TYPES', './SHIM'];
routes = ['./TRM', './BITSNPIECES', './TYPES', './SHIM', './XJSON'];

@@ -24,0 +24,0 @@ for (i = 0, len = routes.length; i < len; i++) {

@@ -174,2 +174,17 @@ // Generated by CoffeeScript 1.9.3

this['XJSON'] = function(T) {
var d, e;
CND.XJSON = require('./XJSON');
e = new Set('xy');
e.add(new Set('abc'));
d = ['A', 'B', e];
help(d);
info(CND.XJSON.stringify(d));
info(CND.XJSON.parse(CND.XJSON.stringify(d)));
T.eq(CND.XJSON.stringify(d), "[\"A\",\"B\",{\"~isa\":\"set\",\"%self\":[\"x\",\"y\",{\"~isa\":\"set\",\"%self\":[\"a\",\"b\",\"c\"]}]}]");
/* TAINT doing string comparison here to avoid implicit test that T.eq deals with sets correctly */
return T.eq(rpr(CND.XJSON.parse(CND.XJSON.stringify(d))), "[ 'A', 'B', Set { 'x', 'y', Set { 'a', 'b', 'c' } } ]");
};
this._main = function(handler) {

@@ -196,3 +211,4 @@ return test(this, {

if (module.parent == null) {
include = ['test type_of'];
include = ['XJSON'];
this._prune();
this._main();

@@ -199,0 +215,0 @@ }

{
"name": "cnd",
"version": "2.0.2",
"version": "2.1.0",
"description": "a grab-bag NodeJS package mainly for functionalities that used to live in coffeenode-trm, coffeenode-bitsnpieces, and coffeenode-types",

@@ -5,0 +5,0 @@ "main": "lib/main.js",

@@ -11,2 +11,3 @@ <!-- START doctoc generated TOC please keep comment here to allow auto update -->

- [Some TDOP Links](#some-tdop-links)
- [XJSON](#xjson)

@@ -16,13 +17,2 @@ <!-- END doctoc generated TOC please keep comment here to allow auto update -->

- [cnd](#cnd)
- [CND Interval Tree](#cnd-interval-tree)
- [CND Shim](#cnd-shim)
- [CND TSort](#cnd-tsort)
- [TSort API](#tsort-api)
- [Some TDOP Links](#some-tdop-links)
> **Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*
# cnd

@@ -328,1 +318,18 @@

* [Douglas Crockford on TDOP: http://javascript.crockford.com/tdop/tdop.html](http://javascript.crockford.com/tdop/tdop.html)
## XJSON
```coffee
e = new Set 'xy'
e.add new Set 'abc'
d = [ 'A', 'B', e, ]
info CND.XJSON.stringify d
info CND.XJSON.parse CND.XJSON.stringify d
```
Output:
```coffee
["A","B",{"~isa":"set","%self":["x","y",{"~isa":"set","%self":["a","b","c"]}]}]
[ 'A', 'B', Set { 'x', 'y', Set { 'a', 'b', 'c' } } ]
```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc