Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
typpy
Advanced tools
Readme
A better typeof for JavaScript.
$ npm i --save typpy
// Dependencies
var Typpy = require("typpy");
console.log(Typpy(0));
// => "number"
console.log(Typpy("", String));
// => true
console.log(Typpy.is(null, "null"));
// => true
console.log(Typpy.get([]));
// => Array
console.log(Typpy({}, true));
// => "object"
console.log(Typpy({}, Object));
// => true
Typpy(input, target)
Gets the type of the input value or compares it with a provided type.
Usage:
Typpy({}) // => "object"
Typpy(42, Number); // => true
Typpy.get([], "array"); => true
input
: The input value.target
: The target type. It could be a string (e.g. "array"
) or a
constructor (e.g. Array
).true
if the input has the provided type target
(if was provided),
false
if the input type does not have the provided type
target
or the stringified type of the input (always lowercase).Typpy.is(input, target)
Checks if the input value has a specified type.
input
: The input value.target
: The target type. It could be a string (e.g. "array"
) or a
constructor (e.g. Array
).true
, if the input has the same type with the target or false
otherwise.Typpy.get(input, str)
Gets the type of the input value. This is used internally.
input
: The input value.str
: A flag to indicate if the return value should be a string or not.Have an idea? Found a bug? See how to contribute.
Another way to support the development of my open-source modules is to set up a recurring donation, via Patreon. :rocket:
PayPal donations are appreciated too! Each dollar helps.
Thanks! :heart:
If you are using this library in one of your projects, add it in this list. :sparkles:
animato
—Simple way to animate anything (even simple values).asyncer.js
—Run groups of (a)sync functions.babel-it
—Babelify your code before npm publish
.barbe
—Like mustache, but simple, tiny and fast.blah
—A command line tool to optimize the repetitive actions.bloggify-ajs-renderer
—ajs renderer for Bloggify.bug-killer
—Simple way to log messages in stdout or other stream.cli-circle
—Generate ASCII circles with NodeJS.cli-gh-cal
—GitHub like calendar graphs in command line.color-it
—Flat colors for your Node.js strings.couleurs
—Add some color and styles to your Node.JS strings.deffy
—Small and fast library to set default values.diable
—Daemonize the things out.dom-repeater
—Render lists in DOM easily.elm-select
—Select DOM elements and optionally call a function.engine-builder
(by jillix)—Engine composition parser.engine-flow-types
(by jillix)—Low level library providing Engine flow types.engine-parser
(by jillix)—Engine composition parser.enny
(by jillix)—Generate Engine compositions from human-readable inputs.err
—A tiny library to create custom errors in JavaScript.exec-limiter
—Limit the shell execution commands to calls same time.flattenize
—An experiment for converting images in flat equivalents.gh-repos
—Get one or all the owner repositories from GitHub.ghcal
—See the GitHub contributions calendar of a user in the command line.ghosty
—A wrapper around PhantomJS, downloading the Phantom binary.git-stats
—Local git statistics including GitHub-like contributions calendars.git-stats-importer
—Imports your commits from a repository into git-stats history.limit-it
—Run in parallel as many functions you want, but not more than functions at the time.obj-flatten
—Convert nested objects in flatten ones.page-changed
—Call a function when the page body is changed.regarde
—A tiny tool and library to watch commands.scrape-it
—A Node.js scraper for humans.tilda
—Tiny module for building command line tools.transformer
—Transform data using synchronous and asynchronous functions.ul
—A minimalist utility library.validify
—Validation made easy.write-file-p
—Create the directory structure and then create the file.FAQs
A better typeof for JavaScript.
We found that typpy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).