Permalink
Browse files

rename to rainge

  • Loading branch information...
1 parent 00b71bd commit 544eee2dbd09bb71d18c407d65376fcb10382cec @dawsonbotsford committed Mar 17, 2016
Showing with 27 additions and 25 deletions.
  1. +2 −2 .github/contributing.md
  2. +1 −1 bundle.js
  3. +7 −5 package.json
  4. +11 −11 readme.md
  5. +6 −6 test.js
@@ -1,6 +1,6 @@
-# Contributing to rainger
+# Contributing to rainge
-:metal::tada:Thank you for helping with rainger! :tada::metal:
+:metal::tada:Thank you for helping with rainge! :tada::metal:
<br>
View
@@ -1,4 +1,4 @@
-(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.rainger = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.rainge = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
View
@@ -1,28 +1,29 @@
{
- "name": "rainger",
+ "name": "rainge",
"version": "0.0.0",
"description": "Generate accurate date ranges for copyrights",
"license": "MIT",
- "homepage": "https://github.com/dawsonbotsford/rainger#readme",
+ "homepage": "https://github.com/dawsonbotsford/rainge#readme",
"repository": {
"type": "git",
- "url": "git+https://github.com/dawsonbotsford/rainger.git"
+ "url": "git+https://github.com/dawsonbotsford/rainge.git"
},
"author": {
"name": "Dawson Botsford",
"email": "DawsonBotsford@gmail.com",
"url": "dawsonbotsford.com"
},
"bugs": {
- "url": "https://github.com/dawsonbotsford/rainger/issues"
+ "url": "https://github.com/dawsonbotsford/rainge/issues"
},
"engines": {
"node": ">=0.12.0"
},
"scripts": {
"test": "xo && ava",
"ava": "ava",
- "bundle": "browserify index.js -s rainger -o bundle.js -t [ babelify --presets [ es2015 ] ]"
+ "bundle": "browserify index.js -s rainge -o bundle.js -t [ babelify --presets [ es2015 ] ]",
+ "precommit": "npm run bundle"
},
"files": [
"index.js"
@@ -44,6 +45,7 @@
"babelify": "^7.2.0",
"browserify": "^13.0.0",
"eslint-config-xo-space": "^0.8.0",
+ "husky": "^0.11.3",
"xo": "^0.12.1"
},
"xo": {
View
@@ -1,6 +1,6 @@
-# rainger
-[![npm version](https://img.shields.io/npm/v/rainger.svg)](https://www.npmjs.com/package/rainger)
-[![npm download count](http://img.shields.io/npm/dm/rainger.svg?style=flat)](http://npmjs.org/rainger)
+# rainge
+[![npm version](https://img.shields.io/npm/v/rainge.svg)](https://www.npmjs.com/package/rainge)
+[![npm download count](http://img.shields.io/npm/dm/rainge.svg?style=flat)](http://npmjs.org/rainge)
[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)
<table>
@@ -13,10 +13,10 @@
<tbody>
<tr>
<td align="center">
- <a href="https://travis-ci.org/dawsonbotsford/rainger"><img src="https://api.travis-ci.org/dawsonbotsford/rainger.svg?branch=master"></a>
+ <a href="https://travis-ci.org/dawsonbotsford/rainge"><img src="https://api.travis-ci.org/dawsonbotsford/rainge.svg?branch=master"></a>
</td>
<td align="center">
- <a href="https://ci.appveyor.com/project/dawsonbotsford/rainger"><img src="https://ci.appveyor.com/api/projects/status/1qjrnuj1tni0osli?svg=true"></a>
+ <a href="https://ci.appveyor.com/project/dawsonbotsford/rainge"><img src="https://ci.appveyor.com/api/projects/status/1qjrnuj1tni0osli?svg=true"></a>
</td>
</tr>
</tbody>
@@ -29,7 +29,7 @@
## Install
```
-npm install --save rainger
+npm install --save rainge
```
<br>
@@ -38,12 +38,12 @@ npm install --save rainger
*Assuming the current year from* `Date` *function is 2016*:
```js
-const rainger = require('rainger');
+const rainge = require('rainge');
-rainger(2016);
+rainge(2016);
//=> '2016'
-rainger(1999);
+rainge(1999);
//=> '1999 - 2016'
```
@@ -57,13 +57,13 @@ I was tired of seeing websites in 2016 that said
or even worse
>© 2012 - 2014
-Using `rainger`, you can set your copyright year once and have it change dynamically year-to-year. If you made your code in 2016, `rainger(2016)` will return `2016` until it is 2017, at which point `rainger(2016)` will return `2016 - 2017`
+Using `rainge`, you can set your copyright year once and have it change dynamically year-to-year. If you made your code in 2016, `rainge(2016)` will return `2016` until it is 2017, at which point `rainge(2016)` will return `2016 - 2017`
<br>
## API
-### rainger(startYear)
+### rainge(startYear)
##### startYear
View
@@ -1,19 +1,19 @@
import test from 'ava';
-import rainger from './';
+import rainge from './';
test('valid args', t => {
t.throws(() => {
- rainger(false);
+ rainge(false);
}, TypeError);
});
test('date in the past', t => {
- t.is(rainger('1999'), `1999 - 2016`);
- t.is(rainger(1999), `1999 - 2016`);
+ t.is(rainge('1999'), `1999 - 2016`);
+ t.is(rainge(1999), `1999 - 2016`);
});
test('current year', t => {
const currentYear = (new Date()).getFullYear();
- t.is(rainger(currentYear), `${currentYear}`);
- t.is(rainger(Number(currentYear)), `${currentYear}`);
+ t.is(rainge(currentYear), `${currentYear}`);
+ t.is(rainge(Number(currentYear)), `${currentYear}`);
});

0 comments on commit 544eee2

Please sign in to comment.