-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2fae09b
Showing
11 changed files
with
459 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Enforce Unix newlines | ||
*.* text eol=lf | ||
*.css text eol=lf | ||
*.html text eol=lf | ||
*.js text eol=lf | ||
*.json text eol=lf | ||
*.less text eol=lf | ||
*.md text eol=lf | ||
*.yml text eol=lf | ||
|
||
*.jpg binary | ||
*.gif binary | ||
*.png binary | ||
*.jpeg binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Numerous always-ignore extensions | ||
*.csv | ||
*.dat | ||
*.diff | ||
*.err | ||
*.gz | ||
*.log | ||
*.orig | ||
*.out | ||
*.pid | ||
*.rar | ||
*.rej | ||
*.seed | ||
*.swo | ||
*.swp | ||
*.vi | ||
*.yo-rc.json | ||
*.zip | ||
*~ | ||
.ruby-version | ||
lib-cov | ||
npm-debug.log | ||
|
||
# Always-ignore dirs | ||
/bower_components/ | ||
/node_modules/ | ||
/temp/ | ||
/tmp/ | ||
/vendor/ | ||
_gh_pages | ||
|
||
# OS or Editor folders | ||
*.esproj | ||
*.komodoproject | ||
.komodotools | ||
*.sublime-* | ||
._* | ||
.cache | ||
.DS_Store | ||
.idea | ||
.project | ||
.settings | ||
.tmproj | ||
nbproject | ||
Thumbs.db | ||
|
||
# grunt-html-validation | ||
validation-status.json | ||
validation-report.json | ||
|
||
# misc | ||
TODO.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"esnext": true, | ||
"boss": true, | ||
"curly": true, | ||
"eqeqeq": true, | ||
"eqnull": true, | ||
"immed": true, | ||
"latedef": true, | ||
"newcap": true, | ||
"noarg": true, | ||
"node": true, | ||
"sub": true, | ||
"undef": true, | ||
"unused": true, | ||
"globals": { | ||
"define": true, | ||
"before": true, | ||
"after": true, | ||
"describe": true, | ||
"it": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
language: node_js | ||
node_js: | ||
- '0.10' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# {%= name %} {%= badge("fury") %} | ||
|
||
> {%= description %} | ||
## Install | ||
{%= include("install") %} | ||
|
||
## Run tests | ||
|
||
```bash | ||
npm test | ||
``` | ||
|
||
## Usage | ||
|
||
```js | ||
var kindOf = require('{%= name %}'); | ||
|
||
kindOf(undefined); | ||
//=> 'undefined' | ||
|
||
kindOf(null); | ||
//=> 'null' | ||
|
||
kindOf(true); | ||
//=> 'boolean' | ||
|
||
kindOf(false); | ||
//=> 'boolean' | ||
|
||
kindOf(new Boolean(true)); | ||
//=> 'boolean' | ||
|
||
kindOf(42); | ||
//=> 'number' | ||
|
||
kindOf(new Number(42)); | ||
//=> 'number' | ||
|
||
kindOf("string"); | ||
//=> 'string' | ||
|
||
kindOf(arguments); | ||
//=> 'arguments' | ||
|
||
kindOf({}); | ||
//=> 'object' | ||
|
||
kindOf(new Test()); | ||
//=> 'object' | ||
|
||
kindOf(new Date()); | ||
//=> 'date' | ||
|
||
kindOf([]); | ||
//=> 'array' | ||
|
||
kindOf([1, 2, 3]); | ||
//=> 'array' | ||
|
||
kindOf(new Array()); | ||
//=> 'array' | ||
|
||
kindOf(/[\s\S]+/); | ||
//=> 'regexp' | ||
|
||
kindOf(new RegExp('^' + 'foo$')); | ||
//=> 'regexp' | ||
|
||
kindOf(function () {}); | ||
//=> 'function' | ||
|
||
kindOf(new Function()); | ||
//=> 'function' | ||
``` | ||
|
||
## Author | ||
{%= include("author") %} | ||
|
||
## License | ||
{%= copyright() %} | ||
{%= license() %} | ||
|
||
*** | ||
|
||
{%= include("footer") %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Copyright (c) 2014 Jon Schlinkert, contributors. | ||
|
||
Permission is hereby granted, free of charge, to any person | ||
obtaining a copy of this software and associated documentation | ||
files (the "Software"), to deal in the Software without | ||
restriction, including without limitation the rights to use, | ||
copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the | ||
Software is furnished to do so, subject to the following | ||
conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
# kind-of [![NPM version](https://badge.fury.io/js/kind-of.svg)](http://badge.fury.io/js/kind-of) | ||
|
||
|
||
> Get the native type of a value. | ||
## Install | ||
#### Install with [npm](npmjs.org): | ||
|
||
```bash | ||
npm i kind-of --save-dev | ||
``` | ||
|
||
## Run tests | ||
|
||
```bash | ||
npm test | ||
``` | ||
|
||
## Usage | ||
|
||
```js | ||
var kindOf = require('kind-of'); | ||
|
||
kindOf(undefined); | ||
//=> 'undefined' | ||
|
||
kindOf(null); | ||
//=> 'null' | ||
|
||
kindOf(true); | ||
//=> 'boolean' | ||
|
||
kindOf(false); | ||
//=> 'boolean' | ||
|
||
kindOf(new Boolean(true)); | ||
//=> 'boolean' | ||
|
||
kindOf(42); | ||
//=> 'number' | ||
|
||
kindOf(new Number(42)); | ||
//=> 'number' | ||
|
||
kindOf("string"); | ||
//=> 'string' | ||
|
||
kindOf(arguments); | ||
//=> 'arguments' | ||
|
||
kindOf({}); | ||
//=> 'object' | ||
|
||
kindOf(new Test()); | ||
//=> 'object' | ||
|
||
kindOf(new Date()); | ||
//=> 'date' | ||
|
||
kindOf([]); | ||
//=> 'array' | ||
|
||
kindOf([1, 2, 3]); | ||
//=> 'array' | ||
|
||
kindOf(new Array()); | ||
//=> 'array' | ||
|
||
kindOf(/[\s\S]+/); | ||
//=> 'regexp' | ||
|
||
kindOf(new RegExp('^' + 'foo$')); | ||
//=> 'regexp' | ||
|
||
kindOf(function () {}); | ||
//=> 'function' | ||
|
||
kindOf(new Function()); | ||
//=> 'function' | ||
``` | ||
|
||
## Author | ||
|
||
**Jon Schlinkert** | ||
|
||
+ [github/jonschlinkert](https://github.com/jonschlinkert) | ||
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) | ||
|
||
## License | ||
Copyright (c) 2014 Jon Schlinkert, contributors. | ||
Released under the MIT license | ||
|
||
*** | ||
|
||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on September 26, 2014._ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "kind-of", | ||
"version": "0.1.0", | ||
"main": [ | ||
"index.js" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
'use strict'; | ||
|
||
/** | ||
* Get the native `typeof` a value. | ||
* | ||
* @param {*} `value` | ||
* @return {*} | ||
*/ | ||
|
||
module.exports = function kindOf(value) { | ||
if (value === null) { | ||
return 'null'; | ||
} | ||
|
||
if (value === undefined) { | ||
return 'undefined'; | ||
} | ||
|
||
return {}.toString.call(value).toLowerCase() | ||
.replace(/^\[object ([\S]+)\]$/, '$1'); | ||
}; |
Oops, something went wrong.