GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - martinkr/onelinecode: "Awesome javascript in one line of code" - A collection of utilities and helpers following the principle: Keep it as simple as possible in one line of code. See: https://dev.to/martinkr/series/15146

BranchesTags
Open more actions menu

Latest commit

 

History

114 Commits
114 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
dist
dist
 
 
doc
doc
 
 
docker
docker
 
 
src
src
 
 
test
test
 
 
.c8rc
.c8rc
 
 
.eslintignore
.eslintignore
 
 
.eslintrc.js
.eslintrc.js
 
 
.gitignore
.gitignore
 
 
.npmrc
.npmrc
 
 
.travis.yml
.travis.yml
 
 
.yarnrc
.yarnrc
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
ajsioloc.png
ajsioloc.png
 
 
docker-build.sh
docker-build.sh
 
 
docker-compose.yml
docker-compose.yml
 
 
package.json
package.json
 
 
release.config.js
release.config.js
 
 
rollup.config.js
rollup.config.js
 
 
yarn-error.log
yarn-error.log
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

Awesome JavaScript in one line of code written above a picture of Mt. Fuji's peak

Awesome javascript in one line of code

A collection of utilities and helpers following the principle: Keep it as simple as possible in one line of code.

As long as we area dealing with JavaScript, the library assumes that the user provides valid input. No type checking or other verifications of the arguments are part of the functions. The library tires to use the simplest and most performant code possible. To keep the functions as simple as possible they will be reduced to the core functionality: "one function should have one specific functionality only".

New functions will be added every time there is an article being published.

All functions are written in ESNext esmodules (./src) and available as -umd (./dist/index.js) with the onelinecode namespace (e.g. window.onlinecode) -commonjs (./dist/index.cjs.js) -esm (./dist/index.esm.js)

Available functions

Array

See ./doc/array.md

Installation

$ npm i @onelinecode/onelinecode
$ yarn add @onelinecode/onelinecode

Usage

For example, you want to shallowClone an array:

import { shallowClone } from '@onelinecode/onelinecode/array';
let array = [1];
let arrayClone = shallowClone(array);

Testing

The library has 100% code coverage with ava and passes the build on Build status from travis-ci.

Contribution

If you are interested in discussion a specific function, please see the corresponding article from the series on dev.to.

Please don't hesitate to comment, give feedback. I appreciate every input or comment. We can and should learn from each others opinion and knowledge. Please stick to a respectful style of discussion and read the code of conduct like the articles or star the repository.

Tech Stack

  • ava: 3.15.0
  • c8: 7.10.0
  • esm: 3.2.25
  • rollup: 2.58.

License

Licensed under the MIT license. MIT - http://www.opensource.org/licenses/mit-license.php

About

"Awesome javascript in one line of code" - A collection of utilities and helpers following the principle: Keep it as simple as possible in one line of code. See: https://dev.to/martinkr/series/15146

Topics

codequalityjavascriptlibrarynodejsutilitieswebdev

Resources

Readme
MIT license

Code of conduct

Code of conduct
Activity

Stars

59 stars

Watchers

2 watching

Forks

5 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.