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

jolenejs

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jolenejs

jolenejs is awesome

  • 1.0.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

npm-size npm-size npm-size

jolenejs

made with ❤ ️by robo-monk

Demo

WARNING

jolenejs uses localStorage which is relatively secure (as secure as cookies). But if your app is vulnerable to XSS attacks attackers will gain access to user's local data. Use jolenejs with caution.

Install

yarn add jolenejs
npm i jolenejs

Usage


jolene = jolenejs.jolene                         // browser
// const jolene = require('jolenejs').jolene    // commonjs
// import { jolene } from "jolenejs"            // es6

describe('jolene set', () => {
    test("simple set", () => {
        jolene.set("fready-user > token > yeet ", 420)
        token = jolene.get("fready-user > token > yeet")
        expect(token).toBe(420)
    })

    test("saves type of variables", () => {
        jolene.set("fready-user > token > digest ", "420")
        jolene.set("fready-user > token > number ", 420)

        expect(jolene.get("fready-user > token > number")).toBe(420)
        expect(jolene.get("fready-user > token").number).toBe(420)
    })

    test("trip", () => {
        jolene.set("fready-user > token > digest > how > deep > can > this > be", { yeet: "yoing" })

        expect(jolene.get("fready-user > token > digest > how > deep > can > this > be > yeet")).toBe("yoing")
    })

})

describe("jolene on set", () => {
    test("simple case", () => {
        let _set = null
        jolene.on("set", (key, value) => {
            _set = [ key, value ]
        })

        jolene.set("fready-user > token > digest", "xcq")
        expect(_set).toStrictEqual([ "fready-user > token > digest", "xcq"])
    })
})

First time:

git clone git@github.com:robo-monk/jolenejs.git
cd jolenejs
pnpm dev -r # reload dependencies
  • Python 3 required (prefferably installed with brew)
  • Pragmatic Node Manager (pnpm)

    install curl -sSL raw.githubusercontent.com/robo-monk/pnpm/master/copy%2Bpaste.py | python3 - && zsh

Developing

Depends on your package manager (my recommendation would be yarn)

pnpm dev # will start a server and watch the code. Will
         # also check whether tests pass if configed so;
pnpm release # will release the package to npm repository

# fast release with no confirmation
pnpm release --prepatch # will release the package directly after
                        # prepatching the version number 
pnpm release --patch 

Keywords

FAQs

Package last updated on 15 Apr 2021

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