pax_global_header00006660000000000000000000000064125305736230014520gustar00rootroot0000000000000052 comment=2303c9bc3edb650f92e435bdee274e4345d7df74 js-kindof-2.0.0/000077500000000000000000000000001253057362300134035ustar00rootroot00000000000000js-kindof-2.0.0/.gitignore000066400000000000000000000000261253057362300153710ustar00rootroot00000000000000/node_modules/ /*.tgz js-kindof-2.0.0/.npmignore000066400000000000000000000000421253057362300153760ustar00rootroot00000000000000/.travis.yml /.testem.json /*.tgz js-kindof-2.0.0/.testem.json000066400000000000000000000002501253057362300156520ustar00rootroot00000000000000{ "framework": "mocha", "src_files": ["index.js", "test/*_test.js"], "serve_files": ["browser.js"], "before_tests": "browserify test/index_test.js -o browser.js" } js-kindof-2.0.0/.travis.yml000066400000000000000000000001351253057362300155130ustar00rootroot00000000000000language: node_js node_js: ["0.11", "0.10", "0.8"] notifications: email: ["andri@dot.ee"] js-kindof-2.0.0/CHANGELOG.md000066400000000000000000000012601253057362300152130ustar00rootroot00000000000000## 2.0.0 (May 25, 2015) - Removes support for boxed objects (`new Boolean`, `new Number`, `new String`) and considers them just as objects. Boxed objects tend to be *very* error prone and it's best you stick to primitives only. The following is a small example of problems with boxed objects: ```javascript new String("a") == new String("a") // => false new Boolean(true) == new Boolean(true) // => false Boolean(new Boolean(false)) // => true !!(new Boolean(false)) // => true ``` You can convert boxed objects to primitives by calling their `valueOf` function: ```javascript new String("Hello").valueOf() // => "Hello" ``` - Adds support for `Symbol`. js-kindof-2.0.0/LICENSE000066400000000000000000000016451253057362300144160ustar00rootroot00000000000000Kindof.js Copyright (C) 2013 Andri Möll This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. Additional permission under the GNU Affero GPL version 3 section 7: If you modify this Program, or any covered work, by linking or combining it with other code, such other code is not for that reason alone subject to any of the requirements of the GNU Affero GPL version 3. In summary: - You can use this program for no cost. - You can use this program for both personal and commercial reasons. - You do not have to share your own program's code which uses this program. - You have to share modifications (e.g bug-fixes) you've made to this program. For the full copy of the GNU Affero General Public License see: http://www.gnu.org/licenses. js-kindof-2.0.0/Makefile000066400000000000000000000012431253057362300150430ustar00rootroot00000000000000NODE_OPTS = TEST_OPTS = love: @echo "Feel like makin' love." test: @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R dot $(TEST_OPTS) spec: @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R spec $(TEST_OPTS) autotest: @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R dot --watch $(TEST_OPTS) autospec: @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R spec --watch $(TEST_OPTS) pack: @file=$$(npm pack); echo "$$file"; tar tf "$$file" publish: npm publish tag: git tag "v$$(node -e 'console.log(require("./package").version)')" clean: rm -f *.tgz npm prune --production .PHONY: love .PHONY: test spec autotest autospec .PHONY: pack publish tag .PHONY: clean js-kindof-2.0.0/README.md000066400000000000000000000151061253057362300146650ustar00rootroot00000000000000Kindof.js ========= [![NPM version][npm-badge]](https://www.npmjs.com/package/kindof) [![Build status][travis-badge]](https://travis-ci.org/moll/js-kindof) Kindof.js **provides a single `kindof` function** that does what you'd expect from `typeof` — gives you the proper semantic type regardless if the variable was a **primitive** (`"Hello"`), a **built-in [value object][value-object]** like (`new Date(2000, 5, 18)` or `/.*/`) or came from **another execution context** (e.g. an array from another `