Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

week-hours

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

week-hours - npm Package Compare versions

Comparing version
0.1.1
to
1.0.0
+1
.coveralls.yml
repo_token: QqgMSY3BrvV3IGCO2uAFwFO6JWkvfMVOE
{
"fileExtensions": [".js"],
"maxErrors": 10,
"esnext": true,
"safeContextKeyword": ["self", "_this", "that"],
"maximumLineLength": {
"value": 80,
"allowUrlComments": true,
"allowComments": true,
"allowRegex": true
},
"validateQuoteMarks": "'",
"validateIndentation": 2,
"requireCurlyBraces": [
"if",
"else",
"for",
"while",
"do",
"try",
"catch"
],
"requireSpaceAfterKeywords": [
"if",
"else",
"for",
"while",
"do",
"switch",
"case",
"return",
"try",
"catch",
"typeof"
],
"requireCamelCaseOrUpperCaseIdentifiers": true,
"requireSpacesInConditionalExpression": true,
"requireSpaceBeforeBlockStatements": true,
"requireSpaceBeforeBinaryOperators": true,
"requireOperatorBeforeLineBreak": true,
"requireCapitalizedConstructors": true,
"requireParenthesesAroundIIFE": true,
"requireCommaBeforeLineBreak": true,
"requireLineFeedAtFileEnd": true,
"requireDotNotation": true,
"disallowYodaConditions": true,
"disallowMultipleLineStrings": true,
"disallowMultipleLineBreaks": true,
"disallowMultipleVarDecl": true,
"disallowMixedSpacesAndTabs": true,
"disallowTrailingComma": true,
"disallowTrailingWhitespace": true,
"disallowSpaceAfterPrefixUnaryOperators": true,
"disallowSpacesInsideObjectBrackets": "all",
"disallowSpacesInsideParentheses": true,
"disallowSpacesInsideArrayBrackets": true,
"disallowNewlineBeforeBlockStatements": true,
"disallowSpaceBeforePostfixUnaryOperators": true,
"disallowImplicitTypeConversion": ["string"],
"disallowKeywords": ["with"],
"disallowKeywordsOnNewLine": ["else"],
"disallowSpacesInCallExpression": true,
"requireSpacesInFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"disallowSpacesInFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInFunctionDeclaration": {
"beforeOpeningRoundBrace": true
},
"plugins": [
"jscs-jsdoc"
],
"jsDoc": {
"checkParamNames": true,
"requireParamTypes": true,
"checkRedundantParams": true,
"checkReturnTypes": true,
"checkRedundantReturns": true,
"requireReturnTypes": true,
"checkRedundantAccess": true,
"checkTypes": "capitalizedNativeCase",
"checkAnnotations": {
"preset": "jsdoc3",
"extra": {
"api": true
}
}
},
"excludeFiles": [
"_gh_pages/**",
"node_modules/**",
"bower_components/**",
"components/**",
"vendor/**",
"build/**",
"dest/**",
"dist/**",
"src/**",
"lib-cov/**",
"coverage/**",
"nbproject/**",
"cache/**",
"temp/**",
"tmp/**"
]
}

Sorry, the diff of this file is not supported yet

+24
-7

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

# editorconfig.org
# .editorconfig <https://github.com/tunnckoCore/dotfiles>
#
# Copyright (c) 2014-2015 Charlike Mike Reagent, contributors.
# Released under the MIT license.
#
root = true

@@ -6,13 +11,25 @@

indent_style = space
indent_size = 2
charset = utf-8
end_of_line = lf
charset = utf-8
insert_final_newline = false
trim_trailing_whitespace = false
[*.{js,php}]
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[package.json]
indent_style = space
[*.{php,html}]
indent_size = 4
[*.{json,cson,yml,yaml,html,md,jade,css,stylus}]
indent_size = 2
[*.md]
trim_trailing_whitespace = false
[Makefile]
indent_size = 2
indent_style = tab
[.*rc]
indent_size = 2
indent_style = space
trim_trailing_whitespace = true

@@ -0,1 +1,7 @@

# .gitattributes <https://github.com/tunnckoCore/dotfiles>
#
# Copyright (c) 2014-2015 Charlike Mike Reagent, contributors.
# Released under the MIT license.
#
# These settings are for any web project

@@ -5,2 +11,3 @@

# and leave all files detected as binary untouched.
* text=auto

@@ -10,5 +17,5 @@

# The above will handle all files NOT found below
#
# These files are text and should be normalized (Convert crlf => lf)
#
# These files are text and should be normalized (Convert crlf => lf)
*.php text

@@ -25,4 +32,7 @@ *.css text

#
# These files are binary and should be left untouched
# (binary is a macro for -text -diff)
#
*.png binary

@@ -42,2 +52,2 @@ *.jpg binary

*.7z binary
*.ttf binary
*.ttf binary
+32
-19
{
"node": true,
"esnext": true,
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"immed": true,
"indent": 2,
"latedef": true,
"newcap": true,
"noarg": true,
"quotmark": "single",
"regexp": true,
"undef": true,
"unused": true,
"strict": true,
"trailing": true,
"smarttabs": true,
"maxerr" : 10,
"indent" : 2,
"maxparams" : 3,
"maxdepth" : 3,
"maxstatements" : 15,
"maxlen" : 120,
"camelcase" : true,
"forin" : false,
"immed" : true,
"newcap" : true,
"quotmark" : "single",
"asi" : true,
"eqnull" : true,
"esnext" : true,
"funcscope" : true,
"globalstrict" : true,
"lastsemic" : true,
"shadow" : true,
"node" : true,
"nonstandard" : true,
"globals": {
"it": true,
"describe": true
"describe": true,
"beforeEach": true,
"afterEach": true,
"before": true,
"after": true,
"define": true,
"should": true
}
}
language: node_js
node_js:
- "0.10"
- "0.11"
matrix:
allow_failures:
- node_js: "0.10"
fast_finish: true
script: "npm run-script test-travis"
after_script: "npm install coveralls && cat ./coverage/lcov.info | coveralls"

@@ -1,1 +0,10 @@

history.md
## v1.0.0 / January 26, 2015
- Release v1.0.0 / npm@v1.0.0
- add coverage
- update tests
- refactor
## v0.0.0 / June 27, 2014
- first commits

@@ -1,5 +0,5 @@

/*!
* week-hours <https://github.com/tunnckoCore/week-hours>
/**
* week-hours <https://github.com/datetime/week-hours>
*
* Copyright (c) 2014 Charlike Mike Reagent, contributors.
* Copyright (c) 2014-2015 Charlike Mike Reagent, contributors.
* Released under the MIT license.

@@ -10,4 +10,20 @@ */

module.exports = function weekHours() {
/**
* Get the number of hours in a week.
*
* **Example:**
*
* ```js
* var weekHours = require('week-hours');
*
* weekHours();
* //=> 168
* ```
*
* @name weekHours
* @return {Number}
* @api public
*/
module.exports = function weekHours(date) {
return 7 * 24;
};

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

Copyright (c) 2014 Charlike Mike Reagent, contributors.
Copyright (c) 2014-2015 [Charlike Make Reagent](http://j.mp/1stW47C), contributors

@@ -22,2 +22,2 @@ Permission is hereby granted, free of charge, to any person

FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
OTHER DEALINGS IN THE SOFTWARE.
{
"name": "week-hours",
"version": "0.1.1",
"version": "1.0.0",
"description": "Get the number of hours in a week.",
"main": "index.js",
"scripts": {
"test": "mocha -R spec"
"lint": "jshint index.js && jscs index.js --reporter inline",
"test": "mocha",
"test-cov": "istanbul cover _mocha",
"test-travis": "istanbul cover _mocha --report lcovonly"
},
"repository": "tunnckoCore/week-hours",
"author": {
"name": "Charlike Make Reagent",
"email": "mameto_100@mail.bg",
"url": "https://github.com/tunnckoCore"
},
"repository": {
"type": "git",
"url": "git://github.com/datetime/week-hours.git"
},
"keywords": [
"week",
"calendar",
"count",
"counts",
"current",
"date",
"dates",
"datetime",
"day",
"days",
"format",
"get",
"hour",
"hours",
"date",
"js",
"leap",
"month",
"months",
"number",
"count"
"numbers",
"real",
"times",
"util",
"utilities",
"utility",
"utils",
"week",
"weekday",
"weeks",
"year",
"years"
],
"license": {
"type": "MIT",
"url": "https://github.com/datetime/week-hours/blob/master/license.md"
},
"dependencies": {},
"devDependencies": {
"mocha": "*"
},
"licenses": [{
"type": "MIT",
"url": "https://github.com/tunnckoCore/week-hours/license.md"
}],
"author": {
"name": "Charlike Mike Reagent",
"email": "mameto_100@mail.bg",
"url": "http://www.whistle-bg.tk"
},
"maintainers": [{
"name": "Charlike Mike Reagent",
"email": "mameto_100@mail.bg",
"url": "http://www.whistle-bg.tk"
}],
"contributors": [{
"name": "Charlike Mike Reagent",
"email": "mameto_100@mail.bg",
"url": "http://www.whistle-bg.tk"
}]
}
"istanbul-harmony": "^0.3.1",
"mocha": "*",
"mocha-lcov-reporter": "^0.0.1"
}
}
+40
-25

@@ -1,19 +0,26 @@

# week-hours [![NPM version][npmjs-img]][npmjs-url] [![Build Status][travis-img]][travis-url] [![Dependency Status][depstat-img]][depstat-url]
## [![npm][npmjs-img]][npmjs-url] [![mit license][license-img]][license-url] [![build status][travis-img]][travis-url] [![coverage status][coveralls-img]][coveralls-url]
> Get the number of hours in a week.
## Install
```bash
npm install week-hours
npm test
```
## Install [![Nodei.co stats][npmjs-install]][npmjs-url]
> Install with [npm](https://npmjs.org)
## API
> For more use-cases see the [tests](./test.js)
```bash
$ npm install week-hours
```
### [weekHours](./index.js#L28)
> Get the number of hours in a week.
# Usage
- `return` **{Number}**
**Example:**
```js
var weekHours = require('week-hours');
weekHours()
weekHours();
//=> 168

@@ -23,33 +30,41 @@ ```

## Authors & Contributors [![author tips][author-gittip-img]][author-gittip]
## Author
**Charlike Mike Reagent**
+ [gittip/tunnckoCore][author-gittip]
+ [gratipay/tunnckoCore][author-gratipay]
+ [twitter/tunnckoCore][author-twitter]
+ [github/tunnckoCore][author-github]
+ [twitter/tunnckoCore][author-twitter]
+ [npmjs/tunnckoCore][author-npmjs]
+ [more ...][contrib-more]
## License [![MIT license][license-img]][license-url]
Copyright (c) 2014 [Charlike Mike Reagent][author-website], [contributors](https://github.com/tunnckoCore/week-hours/graphs/contributors).
Copyright (c) 2014-2015 [Charlike Mike Reagent][contrib-more], [contributors][contrib-graf].
Released under the [`MIT`][license-url] license.
[npmjs-url]: http://npm.im/week-hours
[npmjs-img]: http://img.shields.io/npm/v/week-hours.svg
[npmjs-install]: https://nodei.co/npm/week-hours.png?mini=true
[npmjs-img]: https://img.shields.io/npm/v/week-hours.svg?style=flat&label=week-hours
[license-url]: https://github.com/tunnckoCore/week-hours/blob/master/license.md
[license-img]: http://img.shields.io/badge/license-MIT-blue.svg
[coveralls-url]: https://coveralls.io/r/datetime/week-hours?branch=master
[coveralls-img]: https://img.shields.io/coveralls/datetime/week-hours.svg?style=flat
[travis-url]: https://travis-ci.org/tunnckoCore/week-hours
[travis-img]: https://travis-ci.org/tunnckoCore/week-hours.png?branch=master
[license-url]: https://github.com/datetime/week-hours/blob/master/license.md
[license-img]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat
[depstat-url]: https://david-dm.org/tunnckoCore/week-hours
[depstat-img]: https://david-dm.org/tunnckoCore/week-hours.png
[travis-url]: https://travis-ci.org/datetime/week-hours
[travis-img]: https://img.shields.io/travis/datetime/week-hours.svg?style=flat
[author-gittip-img]: http://img.shields.io/gittip/tunnckoCore.svg
[author-gittip]: https://www.gittip.com/tunnckoCore
[daviddm-url]: https://david-dm.org/datetime/week-hours
[daviddm-img]: https://img.shields.io/david/datetime/week-hours.svg?style=flat
[author-gratipay]: https://gratipay.com/tunnckoCore
[author-twitter]: https://twitter.com/tunnckoCore
[author-github]: https://github.com/tunnckoCore
[author-twitter]: https://twitter.com/tunnckoCore
[author-npmjs]: https://npmjs.org/~tunnckocore
[author-website]: http://www.whistle-bg.tk
[author-npmjs]: https://npmjs.org/~tunnckocore
[contrib-more]: http://j.mp/1stW47C
[contrib-graf]: https://github.com/datetime/week-hours/graphs/contributors
***
_Powered and automated by [kdf](https://github.com/tunnckoCore), January 26, 2015_
+15
-4

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

/**
* week-hours <https://github.com/datetime/week-hours>
*
* Copyright (c) 2014-2015 Charlike Mike Reagent, contributors.
* Released under the MIT license.
*/
'use strict';
var assert = require('assert');
var weekHours = require('./');
var weekHours = require('./index');
it('should get the number of hours in a week', function () {
assert.strictEqual(weekHours(), 168);
assert(typeof weekHours() === 'number');
describe('week-hours:', function() {
it('should get the number of hours in a week', function(done) {
assert.strictEqual(weekHours(), 168);
assert(typeof weekHours() === 'number');
done();
});
});

Sorry, the diff of this file is not supported yet