Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Apr 24, 2024 via pnpm

jsprim 1.4.2

utilities for primitive JavaScript types
Package summary
Share
0
issues
2
licenses
5
MIT
1
(AFL-2.1 OR BSD-3-Clause)
Package created
18 Apr 2012
Version published
29 Nov 2021
Maintainers
10
Total deps
6
Direct deps
4
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
5 Packages, Including:
assert-plus@1.0.0
core-util-is@1.0.2
extsprintf@1.3.0
jsprim@1.4.2
verror@1.10.0

(AFL-2.1 OR BSD-3-Clause)

Permissive
1 Packages, Including:
json-schema@0.4.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

4
All Dependencies CSV
β“˜ This is a list of jsprim 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
assert-plus1.0.03.85 kBMIT
prod
extsprintf1.3.08.8 kBMIT
prod
json-schema0.4.08.73 kB(AFL-2.1 OR BSD-3-Clause)
prod
verror1.10.011.99 kBMIT
prod

Visualizations

Frequently Asked Questions

What does jsprim do?

Jsprim is a valuable utility library for JavaScript developers that helps them work with primitive JavaScript types, including strings, numbers, dates, and objects composed of these basic types. It offers various functionalities such as producing deep copies of objects, comparing objects, checking if an object has any properties, checking if an object has a specific property, iterating over properties of an object, and much more.

How do you use jsprim?

In order to use jsprim, first, you need to install it using npm by running npm install jsprim. Then, you can import the required functions in your JavaScript file. An example for using the deepCopy function would be:

var jsprim = require('jsprim');

var original = {key1: "value1", key2: "value2"};
var copy = jsprim.deepCopy(original);

Besides, to use the isEmpty function, you would write something like this:

var jsprim = require('jsprim');

var object = {};
console.log(jsprim.isEmpty(object)); // will print 'true' if the object is empty

For pluck function, you can do it like this:

var jsprim = require('jsprim');

var obj = { 'foo': { 'bar': {'baz':1}}};
console.log(jsprim.pluck(obj, "foo.bar.baz")); // will print 1

Where are the jsprim docs?

As for the documentation of jsprim, the readme content of its GitHub page serves as the primary source of its documentation. Developers can refer to it in order to know how to install and use different jsprim functions. Additionally, for more advanced usage or understanding, developers can check the source code in the GitHub repository itself at https://github.com/joyent/node-jsprim.