pax_global_header00006660000000000000000000000064125017232750014516gustar00rootroot0000000000000052 comment=c512b7c95fb049aa9b1f039ddc0670611b66cce2 is-primitive-2.0.0/000077500000000000000000000000001250172327500141365ustar00rootroot00000000000000is-primitive-2.0.0/.editorconfig000066400000000000000000000006501250172327500166140ustar00rootroot00000000000000# http://editorconfig.org root = true [*] indent_style = space end_of_line = lf charset = utf-8 indent_size = 2 trim_trailing_whitespace = true insert_final_newline = true [*.json] indent_style = space indent_size = 2 [*.yml] indent_style = space indent_size = 2 [*.md] indent_style = space indent_size = 2 trim_trailing_whitespace = false [test/fixtures/*] trim_trailing_whitespace = false insert_final_newline = falseis-primitive-2.0.0/.gitattributes000066400000000000000000000001771250172327500170360ustar00rootroot00000000000000# Enforce Unix newlines * text eol=lf # binaries *.ai binary *.psd binary *.jpg binary *.gif binary *.png binary *.jpeg binaryis-primitive-2.0.0/.gitignore000066400000000000000000000010061250172327500161230ustar00rootroot00000000000000# Numerous always-ignore extensions *.DS_Store *.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.mdis-primitive-2.0.0/.jshintrc000066400000000000000000000004311250172327500157610ustar00rootroot00000000000000{ "asi": false, "boss": true, "curly": true, "eqeqeq": true, "eqnull": true, "esnext": true, "immed": true, "latedef": false, "laxcomma": false, "mocha": true, "newcap": true, "noarg": true, "node": true, "sub": true, "undef": true, "unused": true }is-primitive-2.0.0/.travis.yml000066400000000000000000000001301250172327500162410ustar00rootroot00000000000000sudo: false language: node_js node_js: - "0.10" - "0.12" - "iojs" git: depth: 10is-primitive-2.0.0/.verb.md000066400000000000000000000010751250172327500154770ustar00rootroot00000000000000# {%= name %} {%= badge("fury") %} {%= badge("travis") %} > {%= description %} {%= include("install-npm", {save: true}) %} ## Running tests {%= include("tests") %} ## Usage ```js var isPrimitive = require('{%= name %}'); isPrimitive('abc'); //=> true isPrimitive(42); //=> true isPrimitive(false); //=> true isPrimitive(true); //=> true isPrimitive({}); //=> false isPrimitive([]); //=> false isPrimitive(function(){}); //=> false ``` ## Author {%= include("author") %} ## License {%= copyright({year: 2014}) %} {%= license() %} *** {%= include("footer") %} is-primitive-2.0.0/LICENSE000066400000000000000000000021001250172327500151340ustar00rootroot00000000000000The MIT License (MIT) Copyright (c) 2014-2015, Jon Schlinkert. 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. is-primitive-2.0.0/README.md000066400000000000000000000020371250172327500154170ustar00rootroot00000000000000# is-primitive [![NPM version](https://badge.fury.io/js/is-primitive.svg)](http://badge.fury.io/js/is-primitive) [![Build Status](https://travis-ci.org/jonschlinkert/is-primitive.svg)](https://travis-ci.org/jonschlinkert/is-primitive) > Returns `true` if the value is a primitive. ## Install with [npm](npmjs.org) ```bash npm i is-primitive --save ``` ## Running tests Install dev dependencies. ```bash npm i -d && npm test ``` ## Usage ```js var isPrimitive = require('is-primitive'); isPrimitive('abc'); //=> true isPrimitive(42); //=> true isPrimitive(false); //=> true isPrimitive(true); //=> true isPrimitive({}); //=> false isPrimitive([]); //=> false isPrimitive(function(){}); //=> false ``` ## Author **Jon Schlinkert** + [github/jonschlinkert](https://github.com/jonschlinkert) + [twitter/jonschlinkert](http://twitter.com/jonschlinkert) ## License Copyright (c) 2014-2015 Jon Schlinkert Released under the MIT license *** _This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 16, 2015._is-primitive-2.0.0/index.js000066400000000000000000000005501250172327500156030ustar00rootroot00000000000000/*! * is-primitive * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT License. */ 'use strict'; // see http://jsperf.com/testing-value-is-primitive/7 module.exports = function isPrimitive(value) { return value == null || (typeof value !== 'function' && typeof value !== 'object'); }; is-primitive-2.0.0/package.json000066400000000000000000000016421250172327500164270ustar00rootroot00000000000000{ "name": "is-primitive", "description": "Returns `true` if the value is a primitive. ", "version": "2.0.0", "homepage": "https://github.com/jonschlinkert/is-primitive", "author": { "name": "Jon Schlinkert", "url": "https://github.com/jonschlinkert" }, "repository": { "type": "git", "url": "git://github.com/jonschlinkert/is-primitive.git" }, "bugs": { "url": "https://github.com/jonschlinkert/is-primitive/issues" }, "license": { "type": "MIT", "url": "https://github.com/jonschlinkert/is-primitive/blob/master/LICENSE" }, "files": [ "index.js" ], "main": "index.js", "engines": { "node": ">=0.10.0" }, "scripts": { "test": "mocha" }, "devDependencies": { "mocha": "*", "should": "^4.0.4" }, "keywords": [ "boolean", "check", "number", "primitive", "string", "symbol", "type", "typeof", "util" ] } is-primitive-2.0.0/test.js000066400000000000000000000022171250172327500154550ustar00rootroot00000000000000/*! * is-primitive * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT License. */ 'use strict'; var should = require('should'); var isPrimitive = require('./'); describe('isPrimitive', function () { it('should return true when primitive value', function () { isPrimitive(null).should.be.true; isPrimitive(undefined).should.be.true; isPrimitive(1).should.be.true; isPrimitive('foo').should.be.true; isPrimitive(true).should.be.true; isPrimitive(false).should.be.true; isPrimitive(NaN).should.be.true; isPrimitive(Infinity).should.be.true; }); it('should return false when not primitive value', function () { isPrimitive({}).should.be.false; isPrimitive([]).should.be.false; isPrimitive(/./).should.be.false; isPrimitive(function () {}).should.be.false; isPrimitive(new function () {}).should.be.false; isPrimitive(new Number).should.be.false; isPrimitive(new String).should.be.false; isPrimitive(new Boolean).should.be.false; isPrimitive(new Date).should.be.false; isPrimitive(new Error).should.be.false; }); });