[Pkg-javascript-commits] [node-is-primitive] 01/07: Import Upstream version 2.0.0

Sruthi Chandran srud-guest at moszumanska.debian.org
Tue Oct 18 13:34:30 UTC 2016


This is an automated email from the git hooks/post-receive script.

srud-guest pushed a commit to branch master
in repository node-is-primitive.

commit 736d2a17bc12864576b6eb33c7fafc0cca417dc4
Author: Sruthi <srud at disroot.org>
Date:   Tue Oct 18 18:48:45 2016 +0530

    Import Upstream version 2.0.0
---
 .editorconfig  | 27 +++++++++++++++++++++++++++
 .gitattributes | 10 ++++++++++
 .gitignore     | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 .jshintrc      | 18 ++++++++++++++++++
 .travis.yml    |  8 ++++++++
 .verb.md       | 45 +++++++++++++++++++++++++++++++++++++++++++++
 LICENSE        | 21 +++++++++++++++++++++
 README.md      | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 index.js       | 13 +++++++++++++
 package.json   | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 test.js        | 37 +++++++++++++++++++++++++++++++++++++
 11 files changed, 335 insertions(+)

diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..32dd133
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,27 @@
+# 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 = false
\ No newline at end of file
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..4a3f1d3
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,10 @@
+# Enforce Unix newlines
+* text eol=lf
+
+# binaries
+*.ai binary
+*.psd binary
+*.jpg binary
+*.gif binary
+*.png binary
+*.jpeg binary
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..92139bd
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,53 @@
+# 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.md
\ No newline at end of file
diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 0000000..6e5a84a
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,18 @@
+{
+  "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
+}
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..efe94c0
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,8 @@
+sudo: false
+language: node_js
+node_js:
+  - "0.10"
+  - "0.12"
+  - "iojs"
+git:
+  depth: 10
\ No newline at end of file
diff --git a/.verb.md b/.verb.md
new file mode 100644
index 0000000..0db40d4
--- /dev/null
+++ b/.verb.md
@@ -0,0 +1,45 @@
+# {%= 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") %}
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..fa30c4c
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+The 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.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..e1c3064
--- /dev/null
+++ b/README.md
@@ -0,0 +1,57 @@
+# 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._
\ No newline at end of file
diff --git a/index.js b/index.js
new file mode 100644
index 0000000..55f11cf
--- /dev/null
+++ b/index.js
@@ -0,0 +1,13 @@
+/*!
+ * is-primitive <https://github.com/jonschlinkert/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');
+};
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..b716f4e
--- /dev/null
+++ b/package.json
@@ -0,0 +1,46 @@
+{
+  "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"
+  ]
+}
diff --git a/test.js b/test.js
new file mode 100644
index 0000000..f1be203
--- /dev/null
+++ b/test.js
@@ -0,0 +1,37 @@
+/*!
+ * is-primitive <https://github.com/jonschlinkert/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;
+  });
+});
\ No newline at end of file

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-is-primitive.git



More information about the Pkg-javascript-commits mailing list