javascript-types
Advanced tools
+30
| typeof null === 'object' ? WTF : sanity. | ||
| This small package fixes that. Simply: | ||
| `npm install javascript-types` | ||
| in your project. | ||
| Then: | ||
| ``` | ||
| import { getTypeOf } from 'javascript-types'; | ||
| const domNode = document.getElementById('x'); | ||
| getTypeOf(null); // 'null' | ||
| typeof null; // 'object' | ||
| getTypeOf(new Date()); // 'date' | ||
| typeof new Date(); // 'object | ||
| getTypeOf([1,2,3]); // 'array' | ||
| typeof [1,2,3]; 'object' | ||
| getTypeOf(domNode); // 'htmldivelement' | ||
| typeof domNode; // 'object | ||
| ... | ||
| ``` | ||
+45
-65
@@ -15,6 +15,7 @@ <?xml version="1.0" encoding="UTF-8"?> | ||
| <counts> | ||
| <entry key="project.closed" value="1" /> | ||
| <entry key="project.closed" value="2" /> | ||
| <entry key="project.open.time.1" value="1" /> | ||
| <entry key="project.open.time.2" value="1" /> | ||
| <entry key="project.open.time.34" value="1" /> | ||
| <entry key="project.opened" value="2" /> | ||
| <entry key="project.opened" value="3" /> | ||
| </counts> | ||
@@ -26,2 +27,3 @@ </usages-collector> | ||
| <entry key="json" value="2" /> | ||
| <entry key="md" value="1" /> | ||
| </counts> | ||
@@ -33,2 +35,3 @@ </usages-collector> | ||
| <entry key="JavaScript" value="1" /> | ||
| <entry key="Markdown" value="1" /> | ||
| </counts> | ||
@@ -38,4 +41,5 @@ </usages-collector> | ||
| <counts> | ||
| <entry key="js" value="1224" /> | ||
| <entry key="json" value="322" /> | ||
| <entry key="js" value="1298" /> | ||
| <entry key="json" value="323" /> | ||
| <entry key="md" value="618" /> | ||
| </counts> | ||
@@ -45,4 +49,5 @@ </usages-collector> | ||
| <counts> | ||
| <entry key="JSON" value="322" /> | ||
| <entry key="JavaScript" value="1224" /> | ||
| <entry key="JSON" value="323" /> | ||
| <entry key="JavaScript" value="1298" /> | ||
| <entry key="Markdown" value="618" /> | ||
| </counts> | ||
@@ -57,3 +62,3 @@ </usages-collector> | ||
| <component name="FileEditorManager"> | ||
| <leaf> | ||
| <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> | ||
| <file pinned="false" current-in-tab="false"> | ||
@@ -71,4 +76,4 @@ <entry file="file://$PROJECT_DIR$/index.js"> | ||
| <provider selected="true" editor-type-id="text-editor"> | ||
| <state relative-caret-position="150"> | ||
| <caret line="10" lean-forward="true" selection-start-line="10" selection-end-line="10" /> | ||
| <state relative-caret-position="30"> | ||
| <caret line="2" column="19" selection-start-line="2" selection-start-column="19" selection-end-line="2" selection-end-column="19" /> | ||
| </state> | ||
@@ -78,2 +83,14 @@ </provider> | ||
| </file> | ||
| <file pinned="false" current-in-tab="false"> | ||
| <entry file="file://$PROJECT_DIR$/README.md"> | ||
| <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]"> | ||
| <state split_layout="SPLIT"> | ||
| <first_editor relative-caret-position="435"> | ||
| <caret line="29" lean-forward="true" selection-start-line="29" selection-end-line="29" /> | ||
| </first_editor> | ||
| <second_editor /> | ||
| </state> | ||
| </provider> | ||
| </entry> | ||
| </file> | ||
| </leaf> | ||
@@ -85,2 +102,3 @@ </component> | ||
| <option value="$PROJECT_DIR$/index.js" /> | ||
| <option value="$PROJECT_DIR$/README.md" /> | ||
| <option value="$PROJECT_DIR$/package.json" /> | ||
@@ -110,2 +128,3 @@ </list> | ||
| <panes> | ||
| <pane id="AndroidView" /> | ||
| <pane id="Scope" /> | ||
@@ -124,3 +143,2 @@ <pane id="PackagesPane" /> | ||
| </pane> | ||
| <pane id="AndroidView" /> | ||
| </panes> | ||
@@ -131,3 +149,3 @@ </component> | ||
| <property name="aspect.path.notification.shown" value="true" /> | ||
| <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1538834734922" /> | ||
| <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1538835349033" /> | ||
| <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" /> | ||
@@ -152,51 +170,2 @@ <property name="nodejs_npm_path_reset_for_default_project" value="true" /> | ||
| </component> | ||
| <component name="RunManager"> | ||
| <configuration default="true" type="JetRunConfigurationType" factoryName="Kotlin"> | ||
| <module name="javascript-types" /> | ||
| <option name="VM_PARAMETERS" /> | ||
| <option name="PROGRAM_PARAMETERS" /> | ||
| <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> | ||
| <option name="ALTERNATIVE_JRE_PATH" /> | ||
| <option name="PASS_PARENT_ENVS" value="true" /> | ||
| <option name="MAIN_CLASS_NAME" /> | ||
| <option name="WORKING_DIRECTORY" /> | ||
| <method v="2"> | ||
| <option name="Make" enabled="true" /> | ||
| </method> | ||
| </configuration> | ||
| <configuration default="true" type="KotlinStandaloneScriptRunConfigurationType" factoryName="Kotlin script"> | ||
| <module name="javascript-types" /> | ||
| <option name="filePath" /> | ||
| <option name="vmParameters" /> | ||
| <option name="alternativeJrePath" /> | ||
| <option name="programParameters" /> | ||
| <option name="passParentEnvs" value="true" /> | ||
| <option name="workingDirectory" /> | ||
| <option name="isAlternativeJrePathEnabled" value="false" /> | ||
| <option name="VM_PARAMETERS" /> | ||
| <option name="PROGRAM_PARAMETERS" /> | ||
| <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> | ||
| <option name="ALTERNATIVE_JRE_PATH" /> | ||
| <option name="PASS_PARENT_ENVS" value="true" /> | ||
| <option name="MAIN_CLASS_NAME" /> | ||
| <option name="WORKING_DIRECTORY" /> | ||
| <option name="filePath" /> | ||
| <option name="vmParameters" /> | ||
| <option name="alternativeJrePath" /> | ||
| <option name="programParameters" /> | ||
| <option name="passParentEnvs" value="true" /> | ||
| <option name="workingDirectory" /> | ||
| <option name="isAlternativeJrePathEnabled" value="false" /> | ||
| <option name="VM_PARAMETERS" /> | ||
| <option name="PROGRAM_PARAMETERS" /> | ||
| <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> | ||
| <option name="ALTERNATIVE_JRE_PATH" /> | ||
| <option name="PASS_PARENT_ENVS" value="true" /> | ||
| <option name="MAIN_CLASS_NAME" /> | ||
| <option name="WORKING_DIRECTORY" /> | ||
| <method v="2"> | ||
| <option name="Make" enabled="true" /> | ||
| </method> | ||
| </configuration> | ||
| </component> | ||
| <component name="SvnConfiguration"> | ||
@@ -213,3 +182,4 @@ <configuration /> | ||
| <workItem from="1538829318950" duration="68000" /> | ||
| <workItem from="1538829393084" duration="3933000" /> | ||
| <workItem from="1538829393084" duration="4512000" /> | ||
| <workItem from="1538835373568" duration="189000" /> | ||
| </task> | ||
@@ -219,3 +189,3 @@ <servers /> | ||
| <component name="TimeTrackingManager"> | ||
| <option name="totallyTimeSpent" value="4001000" /> | ||
| <option name="totallyTimeSpent" value="4769000" /> | ||
| </component> | ||
@@ -226,3 +196,3 @@ <component name="ToolWindowManager"> | ||
| <layout> | ||
| <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.2532189" /> | ||
| <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.25679544" /> | ||
| <window_info id="Structure" order="1" side_tool="true" weight="0.25" /> | ||
@@ -270,6 +240,16 @@ <window_info id="Image Layers" order="2" /> | ||
| </entry> | ||
| <entry file="file://$PROJECT_DIR$/README.md"> | ||
| <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]"> | ||
| <state split_layout="SPLIT"> | ||
| <first_editor relative-caret-position="435"> | ||
| <caret line="29" lean-forward="true" selection-start-line="29" selection-end-line="29" /> | ||
| </first_editor> | ||
| <second_editor /> | ||
| </state> | ||
| </provider> | ||
| </entry> | ||
| <entry file="file://$PROJECT_DIR$/package.json"> | ||
| <provider selected="true" editor-type-id="text-editor"> | ||
| <state relative-caret-position="150"> | ||
| <caret line="10" lean-forward="true" selection-start-line="10" selection-end-line="10" /> | ||
| <state relative-caret-position="30"> | ||
| <caret line="2" column="19" selection-start-line="2" selection-start-column="19" selection-end-line="2" selection-end-column="19" /> | ||
| </state> | ||
@@ -276,0 +256,0 @@ </provider> |
+1
-1
| { | ||
| "name": "javascript-types", | ||
| "version": "1.0.0", | ||
| "version": "1.0.1", | ||
| "description": "A fixed version of the native javascript typeof function.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
7
16.67%1
-50%31
Infinity%14836
-1%