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

crumble

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crumble - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

69

Gruntfile.js

@@ -6,5 +6,5 @@ module.exports = function (grunt)

grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-mocha-cli');

@@ -20,58 +20,61 @@ // Configuration

jshint : // https://github.com/gruntjs/grunt-contrib-jshint
jshint :
{
options :
test :
{
jshintrc : '.jshintrc'
},
options :
{
jshintrc : '.jshintrc'
},
src : ['src/Crumble.js', 'test/Crumble.js']
src : ['src/Crumble.js', 'test/Crumble.js']
}
},
uglify : // https://github.com/gruntjs/grunt-contrib-uglify
uglify :
{
build :
{
files :
options :
{
'build/Crumble.js' : 'src/Crumble.js'
}
},
banner : '// Crumble \n'
+ '// Version: <%= package.version %> \n'
+ '// Author: <%= package.author.name %> (<%= package.author.url %>) \n'
+ '// License: <%= package.license %> \n',
options :
{
banner : '// Crumble \n'
+ '// Version: <%= package.version %> \n'
+ '// Author: <%= package.author.name %> (<%= package.author.url %>) \n'
+ '// License: <%= package.license %> \n',
report : 'gzip'
},
report : 'gzip'
files : { 'build/Crumble.js' : 'src/Crumble.js' }
}
},
mochaTest :
mochacli :
{
options :
test :
{
reporter : 'spec'
},
options :
{
reporter : 'spec'
},
src : ['test/Crumble.js']
src : ['test/Crumble.js']
}
}
});
// Task: `test`
// ----------------------------------------------------
grunt.registerTask('test', ['jshint', 'mochaTest']);
grunt.registerTask('test', ['jshint:test', 'mochacli:test']);
// Task: `build`
// ----------------------------------------------------
grunt.registerTask('build', ['test', 'uglify']);
grunt.registerTask('build', ['test', 'uglify:build']);
// Task `default`
// ----------------------------------------------------
grunt.registerTask('default', ['build']);
};
};
{
"name" : "crumble",
"version" : "0.2.1",
"version" : "0.2.0",
"description" : "A simple utility that abstracts the legacy API that is document.cookie",

@@ -11,4 +11,4 @@

"name" : "Luke Phillips",
"email" : "lukephil92@gmail.com",
"url" : "http://lsphillips.com"
"email" : "lsphillips.mail@gmail.com",
"url" : "http://www.lsphillips.com"
},

@@ -38,15 +38,10 @@

{
"should" : "^4.4.2",
"sinon" : "^1.12.2",
"grunt" : "^0.4.5",
"grunt-contrib-jshint" : "^0.10.0",
"grunt-contrib-uglify" : "^0.6.0",
"grunt-mocha-test" : "^0.12.4"
"should" : "7.0.1",
"sinon" : "1.15.4",
"grunt" : "0.4.5",
"grunt-contrib-jshint" : "0.11.2",
"grunt-contrib-uglify" : "0.9.1",
"grunt-mocha-cli" : "1.13.1"
},
"scripts" :
{
"test" : "grunt test"
},
"main" : "src/Crumble.js",

@@ -53,0 +48,0 @@

@@ -301,11 +301,10 @@ /* global document : false */

{
cookie += ';domain=';
if (domain === '.')
{
cookie += getRootDomain();
domain = getRootDomain();
}
else
if (domain !== document.domain)
{
cookie += domain;
cookie += ';domain=' + domain;
}

@@ -312,0 +311,0 @@ }

@@ -262,3 +262,3 @@ /* jshint node : true, mocha : true, expr : true, es3 : false */

it('a cookie without a `domain` crumb, will be set to be available only on the domain of the current document', function ()
it('a cookie without a `domain` crumb, will be set to be available on the domain of the current document', function ()
{

@@ -307,2 +307,14 @@ Crumble.set(

it('a cookie with a `domain` crumb set to a value equal to `document.domain`, will be set to be available on the domain of the current document', function ()
{
global.document.domain = 'a.domain.com';
Crumble.set(
{
name : 'name', value : 'value', domain : 'a.domain.com'
});
global.document.cookie.should.equal('name=value;path=/');
});
it('a cookie with a `secure` crumb equating to `true`, will be set to be available only over HTTPS', function ()

@@ -309,0 +321,0 @@ {

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