Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

This package has been deprecated

Author message:

This library is no longer being supported. For a simliar development experience please use the fjl (Functional javascript library) library: https://www.npmjs.com/package/fjl .

sjljs

7.0.3 • Public • Published

Build Status GitHub version NPM version Dependencies sjljs

Aside Note:

This library is no longer being supported.
Use the library's spiritual successor instead: fjl (Functional javascript library).

Intro

A library for writing strongly typed javascript and solid classical oop. Also for making your applications, components, and libraries more concise.

Not meant to replace popular libraries like Backbone, Underscore, or Jquery etc.. Only meant as a supplement to them or as a supplement to applications requiring quick ramp up.

Note:

(This change only affects node users)

Reinstated all members of sjl.ns.stdlib to also be available on sjl.stdlib... and also to be accessible directly on sjl.

Jsdocs

Api for current version:

Docs for previous versions:

Sections in Readme:

Getting Started:

Include either the full library './sjl[.min].js' or the minimal version './sjl-minimal[.min].js' (the minimal version only includes the core and no classes or constructors from it's other packages).

Other Packages and members:

Legend

  • (m) - Member prefix. Denotes item is a member; E.g., A constructor, method or a property.
  • (p) - Package prefix. Denotes item is a package; E.g., an object with access to package members directly on it.

Other Packages and Members List:

Sjl direct Members and Methods:

Legend

  • (m) - Member prefix. Denotes item is a member; E.g., A method or property.

Members/Methods:

(m) sjl.Either

@todo - Added documentation here. Back to other packages and members list.

(m) sjl.Identity

@todo - Added documentation here. Back to other packages and members list.

(m) sjl.Maybe

@todo - Added documentation here. Back to other packages and members list.

(m) sjl.Monad

@todo - Added documentation here. Back to other packages and members list.

(m) sjl.Symbol

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl._

This is a place holder member. It is an immutable value that can be used to represent a placeholder other than null; E.g., used by sjl.curry and sjl.curryN to allow curry functions and using place holders for values you're not ready to passed in; E.g.,

var slice = Array.prototype.slice,
 add = function () {...}, // recursively adds
 multiply = function () {...}; // recursively multiplies

sjl.curry(add, __, __, __)(1, 2, 3, 4, 5) === 15 // `true`
sjl.curry(multiply, __, 2, __)(2, 2) === Math.pow(2, 3) // `true`
sjl.curry(divide, __, 625, __)(3125, 5)

Back to sjl direct members and methods list.

(m) sjl.argsToArray

Same as Array.prototype.slice but neatly packaged for reuse; Also essentially used to convert an arguments object to an actual array.

E.g.,

function someFunction () {
    // `arguments` gets returned as an actual array here.
    return sjl.argsToArray(arguments).map( arg => someProcess(arg) );
}

Back to sjl direct members and methods list.

(m) sjl.arrayLikeToArray

Converts array likes (Set, Map, SjlSet, SjlMap, Array, Arguments) to arrays (returns passed in arrays untouched).

Back to sjl direct members and methods list.

(m) sjl.autoNamespace

Allows you to set or get a path on an object by namespace string.

Back to sjl direct members and methods list.

(m) sjl.camelCase

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.classOf

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.classOfIs

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.classOfIsMulti

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.classicalToStringMethod

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.clone

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.compose

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.concatArrayLikes

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.constrainPointer

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.curry

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.curry1

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.curry2

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.curry3

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.curry4

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.curry5

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.curryN

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.defineEnumProp

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.defineSubClass

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.defineSubClassPure

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.empty

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.emptyMulti

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.extend

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.extractBoolFromArrayEnd

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.extractBoolFromArrayStart

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.extractFromArrayAt

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.filter.BooleanFilter

@todo - Added documentation here. Back to other packages and members list.

(m) sjl.filter.Filter

@todo - Added documentation here. Back to other packages and members list.

(m) sjl.filter.FilterChain

@todo - Added documentation here. Back to other packages and members list.

(m) sjl.filter.SlugFilter

@todo - Added documentation here. Back to other packages and members list.

(m) sjl.filter.StringToLowerFilter

@todo - Added documentation here. Back to other packages and members list.

(m) sjl.filter.StringTrimFilter

@todo - Added documentation here. Back to other packages and members list.

(m) sjl.filter.StripTagsFilter

@todo - Added documentation here. Back to other packages and members list.

(m) sjl.filter

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.fn

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.forEach

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.forEachInObj

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.generated

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.generated.version

@todo - Added documentation here. Back to other packages and members list.

(m) sjl.getArrayLikes

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.getIterator

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.hasIterator

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.hasMethod

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.implode

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.input.Input

@todo - Added documentation here. Back to other packages and members list.

(m) sjl.input.InputFilter

@todo - Added documentation here. Back to other packages and members list.

(m) sjl.input

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.isArray

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.isBoolean

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.isEmpty

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.isEmptyObj

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.isEmptyOrNotOfType

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.isFunction

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.isNodeEnv

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.isNull

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.isNumber

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.isObject

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.isString

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.isSymbol

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.isUndefined

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.isset

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.issetAndOfType

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.issetMulti

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.iteratorToArray

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.jsonClone

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.lcaseFirst

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.mapToArray

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.math

@todo - Added documentation here. Back to other packages and members list.

(m) sjl

@todo - Added documentation here. Back to other packages and members list.

(m) sjl.mergeOnProps

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.mergeOnPropsMulti

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.nodejs.Namespace

@todo - Added documentation here. Back to other packages and members list.

(m) sjl.nodejs

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.notArrayLikeToArray

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.notEmptyAndOfType

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.ns

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.objToArray

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.objToArrayMap

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.package

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.restArgs

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.searchObj

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.setToArray

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.sjl

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.sjlfn

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.stdlib.Config

@todo - Added documentation here. Back to other packages and members list.

(m) sjl.stdlib.Extendable

@todo - Added documentation here. Back to other packages and members list.

(m) sjl.stdlib.Iterator

@todo - Added documentation here. Back to other packages and members list.

(m) sjl.stdlib.ObjectIterator

@todo - Added documentation here. Back to other packages and members list.

(m) sjl.stdlib.Optionable

@todo - Added documentation here. Back to other packages and members list.

(m) sjl.stdlib.PriorityList

@todo - Added documentation here. Back to other packages and members list.

(m) sjl.stdlib.PriorityListItem

@todo - Added documentation here. Back to other packages and members list.

(m) sjl.stdlib.SjlMap

@todo - Added documentation here. Back to other packages and members list.

(m) sjl.stdlib.SjlSet

@todo - Added documentation here. Back to other packages and members list.

(m) sjl.stdlib.iterable

@todo - Added documentation here. Back to other packages and members list.

(m) sjl.stdlib

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.throwTypeErrorIfEmpty

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.throwTypeErrorIfEmptyOrNotOfType

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.throwTypeErrorIfNotOfType

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.toArray

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.ucaseFirst

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.unConfigurableNamespace

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.unset

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.valueOrDefault

@todo - Added documentation here. Back to sjl direct members and methods list.

(m) sjl.wrapPointer

@todo - Added documentation here. Back to sjl direct members and methods list.

(p) sjl.filter

@todo - Added documentation here. Back to other packages and members list.

(p) sjl.generated

@todo - Added documentation here. Back to other packages and members list.

(p) sjl.input

@todo - Added documentation here. Back to other packages and members list.

(p) sjl.nodejs

@todo - Added documentation here. Back to other packages and members list.

(p) sjl.stdlib

@todo - Added documentation here. Back to other packages and members list.

Unit Tests:

To run unit tests:

1.) First do an npm install in project root.

2.) For running tests with node: Run one of the following from your terminal:

  • $ gulp tests,
  • $ mocha tests/for-server, or
  • $ npm tests

3.) For running tests in the browser:

Requirements:

  • Javascript versions ecmascript 5+

Supported Platforms:

Browsers

  • IE9+, and all other modern day browsers.

NodeJs

  • 4.0.0+

Todos:

MVP for 6.1.0

  • - @todo Include all sub items for components included as sub nav in readme. All docs will now be included in api docs instead (generated with jsdocs).
  • - @todo Cleanup all jsdocs and ensure all library members are listed there and showing their docs properly/clearly.
  • - @todo Ensure all existing constructors and library members have a test file for theirselves.

License:

GPL v2+ AND MIT

Install

npm i sjljs

DownloadsWeekly Downloads

18

Version

7.0.3

License

GPL-2.0+ AND MIT

Unpacked Size

4.65 MB

Total Files

262

Last publish

Collaborators

  • avatar