🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

simple-carousel

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

simple-carousel - npm Package Compare versions

Comparing version
1.0.0
to
1.1.0
+20
dist/index.js
'use strict';
var _names = require('./names.json');
var _names2 = _interopRequireDefault(_names);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
module.exports = {
all: _names2.default,
mirror: mirror
};
function mirror(value) {
if (value === undefined) {
return false;
} else {
return value;
}
};
[
"Hello",
"World"
]
+35
-5
{
"name": "simple-carousel",
"version": "1.0.0",
"version": "1.1.0",
"description": "Simple carousel library",

@@ -8,4 +8,9 @@ "main": "src/index.js",

"commit": "git-cz",
"test": "mocha src/index.test.js -w",
"test:single": "mocha src/index.test.js",
"check-coverage": "nyc check-coverage --statements 100 --branches 100 --functions 100 --lines 100",
"report-coverage": "cat ./coverage/lcov.info | codecov",
"watch:test": "npm t -- -w",
"test": "mocha src/index.test.js --compilers js:babel-register",
"cover": "nyc npm t",
"prebuild": "rimraf dist",
"build": "babel --copy-files --out-dir dist --ignore *.test.js src",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"

@@ -21,2 +26,6 @@ },

],
"files": [
"dist",
"README.md"
],
"author": "Ernest Sim <ernest.codes@gmail.com> (https://github.com/idl3)",

@@ -29,11 +38,32 @@ "license": "MIT",

"devDependencies": {
"babel-cli": "6.14.0",
"babel-preset-es2015": "6.14.0",
"babel-preset-es2017": "6.14.0",
"babel-preset-stage-3": "6.11.0",
"babel-register": "6.14.0",
"chai": "3.5.0",
"codecov.io": "0.1.6",
"commitizen": "2.8.6",
"cz-conventional-changelog": "1.2.0",
"ghooks": "1.3.2",
"istanbul": "0.4.5",
"mocha": "3.0.2",
"nyc": "8.3.0",
"rimraf": "2.5.4",
"semantic-release": "^4.3.5"
},
"czConfig": {
"path": "node_modules/cz-conventional-changelog"
"config": {
"ghooks": {
"pre-commit": "npm run cover && npm run check-coverage"
},
"commitizen": {
"path": "node_modules/cz-conventional-changelog"
},
"babel": {
"presets": [
"es2015",
"es2017"
]
}
}
}

@@ -1,1 +0,8 @@

# Carousel
# Simple Carousel
[![travis build](https://img.shields.io/travis/grain-tech/Carousel.svg?style=flat-square)](https://travis-ci.org/grain-tech/Carousel)
[![codecov coverage](https://img.shields.io/codecov/c/github/grain-tech/Carousel.svg?style=flat-square)](https://codecov.io/gh/grain-tech/Carousel)
[![version](https://img.shields.io/npm/v/simple-carousel.svg?style=flat-square)](https://www.npmjs.com/package/simple-carousel)
[![MIT license](https://img.shields.io/npm/l/simple-carousel.svg?style=flat-square)](https://opensource.org/licenses/MIT)
Simple and lightweight carousel script
-20
sudo: false
language: node_js
cache:
directories:
- node_modules
notifications:
email: false
node_js:
- '4'
before_install:
- npm i -g npm@^2.0.0
before_script:
- npm prune
script:
- npm run test:single
after_success:
- npm run semantic-release
branches:
except:
- /^v\d+\.\d+\.\d+$/
var names = require('./names.json');
var mirror = function(value){
if (value === undefined) {
return false;
} else {
return value;
}
};
module.exports = {
all: names,
mirror: mirror
};
var expect = require('chai').expect;
var carousel = require('./index');
describe('carousel', function() {
it('should be an array of strings', function() {
expect(carousel.all).to.satisfy(isArrayOfStrings);
function isArrayOfStrings(array) {
return array.every(function(item) {
return typeof item == 'string';
})
}
});
it('should contain Hello', function() {
expect(carousel.all).to.include('Hello');
});
});
describe('mirror', function() {
it('should return true', function() {
result = carousel.mirror();
expect(result).to.eq(false);
});
it('should return false if passed false', function() {
result = carousel.mirror('false');
expect(result).to.eq('false');
})
});
[
"Hello",
"World"
]