Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

core-functions

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

core-functions

Core functions and utilities for working with primitives and built-in objects, including strings, functions, booleans, Promises, base 64, etc.

  • 1.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
62
increased by26.53%
Maintainers
1
Weekly downloads
 
Created
Source

core-functions v1.1.1

Core functions and utilities for working with Node/JavaScript primitives and built-in objects, including strings, functions, booleans, Promises, base 64, etc.

Currently includes:

  • strings.js - string utilities
  • numbers.js - number utilities
  • booleans.js - boolean utilities
  • functions.js - function utilities
  • promises.js - native Promise utilities
  • base64.js - utilities for encoding from UTF-8 to Base 64 and vice-versa

This module is exported as a Node.js module.

Installation

Using npm:

$ {sudo -H} npm i -g npm
$ npm i --save core-functions

In Node.js:

// To use the string utilties
const Strings = require('core-functions/strings');

// To use the number utilties
const Numbers = require('core-functions/numbers');

// To use the boolean utilties
const Booleans = require('core-functions/booleans');

// To use the function utilties
const Functions = require('core-functions/functions');

// To use the Base 64 encoding and decoding utilities
const base64 = require('core-functions/base64');

// To use the Promise utilties, which currently add static methods to the native `Promise` class
require('core-functions/promises');

Unit tests

This module's unit tests were developed with and must be run with tape. The unit tests have been tested on Node.js v4.3.2.

See the package source for more details.

Changes

1.1.0

  • strings: Added trimOrEmpty function
  • strings: Renamed safeTrim function to trim and changed safeTrim to an alias for trim

FAQs

Package last updated on 20 Oct 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc