Created
November 27, 2013 01:18
-
-
Save deian/7669196 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var dcl = require('./dclabels.js'); | |
var l = new dcl.Label([new dcl.Group("yo"), | |
new dcl.Group(["a","b"]), | |
new dcl.Group(["yo","no"]), | |
new dcl.Group(["a"]) | |
]) | |
console.log(l+'') | |
console.log(l.subsumes(new dcl.Label())+'') | |
console.log((new dcl.Label()).subsumes(l)+''); | |
var l2 = (new dcl.Label(l)).and("woot"); | |
console.log(l2+' > '+l+' : '+l2.subsumes(l)+''); | |
var l3 = (new dcl.Label(l)).and(new dcl.Group(["woot","yoy"])); | |
console.log(l3+' > '+l2+' : '+l3.subsumes(l2)+''); | |
console.log(l2+' < '+l3+' : '+l2.subsumes(l3)+''); | |
console.log(((new dcl.Label("a")).and("yo")).or(new dcl.Label(new dcl.Group(["b","c"])))+''); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var lio = require('./lio'); | |
console.log(lio.privacyLabel+''); | |
//lio.privacyLabel = new lio.Label("w00t"); | |
console.log(lio.privacyLabel+''); | |
//lio.privacyLabel = new lio.Label("w00t").and("what"); | |
console.log(lio.privacyLabel+''); | |
var l = new lio.Labeled(33, { privacy: new lio.Label("w00t").and("what") }); | |
console.log(l+''); | |
console.log(lio.privacyLabel+''); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment