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

saml2js

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

saml2js - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

.editorconfig

11

index.js

@@ -48,4 +48,4 @@ // Saml2js

// (Basically just an alias to `JSON.stringify()`).
Saml2js.prototype.toJSON = function(obj) {
return JSON.stringify(obj);
Saml2js.prototype.toJSON = function() {
return JSON.stringify(this.parsedSaml);
};

@@ -67,3 +67,8 @@

Saml2js.prototype.get = function(key) {
return this.parsedSaml[_.camelCase(key)];
var value = this.parsedSaml[_.camelCase(key.toLowerCase())];
if (_.isUndefined(value)) {
return undefined;
} else {
return _.isEmpty(value) ? null : value;
}
};

@@ -70,0 +75,0 @@

{
"name": "saml2js",
"version": "0.1.0",
"version": "0.1.1",
"description": "Parse SAML2 attributes into a JavaScript object.",

@@ -27,6 +27,15 @@ "main": "index.js",

"homepage": "https://github.com/Aplo/saml2js",
"devDependencies": {},
"devDependencies": {
"chai": "^3.2.0",
"grunt": "^0.4.5",
"grunt-contrib-jshint": "^0.11.2",
"grunt-contrib-watch": "^0.6.1",
"jshint-stylish": "^2.0.1",
"load-grunt-tasks": "^3.2.0",
"mocha": "^2.2.5",
"time-grunt": "^1.2.1"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "./node_modules/mocha/bin/mocha"
}
}

@@ -1,2 +0,2 @@

# saml2js
# saml2js [![Build Status](https://travis-ci.org/Aplo/saml2js.svg?branch=master)](https://travis-ci.org/Aplo/saml2js)

@@ -11,2 +11,4 @@ > Parses SAML responses into JS objects you can read and manipulate.

Saml2js supports Node.js 0.10+ and iojs.
## Usage

@@ -16,3 +18,3 @@

```
```js
var express = require('express')

@@ -44,3 +46,3 @@ Saml2js = require('saml2js'),

#### `asObject()`
#### `toObject()`

@@ -101,2 +103,14 @@ Returns the parsed SAML as a JavaScript object.

## Testing
Testing requires Mocha and Chai.
1. Clone the repository
2. Run `npm install && npm install -g mocha`
3. Finally, run `mocha`
## Contributing
When contributing, be sure to branch off of `develop` to get the latest changes. Contributions are welcome. Please try to write tests for your code so we can merge it in faster.
## Credit

@@ -103,0 +117,0 @@

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